I am dealing with pattern matching of url strings containing categories in arabic language.
For example, in english, whenever I see something like the following:
matching pattern -> (.*)/Store/SomeThing/(.*)
I replace it with this pattern-> $1/store/something
so that this
http://baseurl.com/en-gb/Store/SomeThing/WhatEver
could be without "whatever" and become like
http://baseurl.com/en-gb/store/something
Now, how can I do something like this in arabic language ?
for example, here are my tests:
1) Test urls to match:
1a)
http://baseurl.com/ar-gb/Store/عرمنتجات/عرع
1b)
http://baseurl.com/ar-gb/Store/عرع/عرمنتجات
How to cut everything coming after عرمنتجات
, regardless of the fact that since "/" is also an arabic character, it is handled just like other arabic letters?
2) Matching patterns under test:
2a)
(.*)/Store/عرمنتجات/(.*)
2b)
(.*)/Store/(.*)/عرمنتجات
2c)
(.*)/Store/عرمنتجات
:::: TEST RESULTS ::::
During my tests
(1a) matched with (2a) and (2c), which looks very strange for both
(1b) matched with (2b) but is strange, I would have assumed (2a) to work with it but doesn't
Long story short, what is the equivalent of this pattern matching:
- (.*)/Store/SomeThing/(.*)
in arabic language, considering SomeThing being written in Arabic ?