Neo4j Cypher RegExp request to ignore case does not work on non-Latin characters

Sometimes I have to search for nodes by request of RegExp ignore case, and it does not work with non-Latin characters.

For example, I have node.name property = і є

If i'm looking

 name =~ (?i).* і є.* 

everything is working fine

but in case

 name =~ (?i).* і є.* 

he is not looking for node.

By the way, everything works fine in Latin letters.

What am I doing wrong and how to fix it?

+5
source share
1 answer

You need to add 'u' to your regular expression in order to convert it to a case-insensitive unicode regular expression. Like this:

 name =~ (?ui).* і є.* 
+3
source

Source: https://habr.com/ru/post/1268550/


All Articles