Why preg_match is not working?

If I write PHP code
if (!preg_match('/\/ettevote\/filter\/abc\/([A-Za-z0-9-&ŠšŽžÕõÄäÖöÜü])/', $_SERVER['REQUEST_URI'], $code)) {
 die('Not found!');
}

and open the link /et/ettevote/filter/abc/ü , it gives NOT FOUND.

Does not work it is the letter ü, and with any usual letter latinia a-z works.
How to fix?
April 19th 20 at 12:32
1 answer
April 19th 20 at 12:34
Because the modifiers are not used. Add u.
how to add? here so does not work:
(!preg_match('/\/ettevote\/filter\/abc\/([A-Za-z0-9ŠšŽžÕõÄäÖöÜü])/u', $_SERVER['REQUEST_URI'], $code))
- santiago.Boehm commented on April 19th 20 at 12:37
Think you have me fooled. Everything works. - Mabel_Daugherty commented on April 19th 20 at 12:40
I think that's why it doesn't work.
I'm checking a match on the variable $_SERVER['REQUEST_URI'] when you open
/et/ettevote/filter/abc/ü retrieves the value of /et/ettevote/filter/abc/%C3%BC

how to work with it? - santiago.Boehm commented on April 19th 20 at 12:43
@santiago.Boehm, somehow so. - Mabel_Daugherty commented on April 19th 20 at 12:46

Find more questions by tags Regular expressionsPHP