L
L
Leroro2020-04-17 16:13:04
Unicode
Leroro, 2020-04-17 16:13:04

Why regular expression with Cyrillic does not work?

There is, for example, the expression "zai banzai" if I use the regular expression \bzai\b it will not work on the word "zai", if I do the same in Latin, everything is ok. I'm not a regular expression guru, but is it possible to specify the use of unicode in a regular expression? There is an old Perlov crm and there is a filter for regular expressions, but something doesn’t get along with Cyrillic like https://regex101.com/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2020-04-17
@Rsa97

What programming language? PHP requires the u modifier to work with UTF-8 strings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question