Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j Cypher RegExp ignore case query doesn't work on non-Latin characters

Tags:

neo4j

cypher

Sometimes I have to search nodes by RegExp ignore case query and it doesn't work on non-Latin characters.

For example I have a node.name property = ЖК Львівський маєток

If I search by

name =~ (?i).*ЖК Львівський маєток.*

everything is working fine

but in case of

name =~ (?i).*жк Львівський маєток.*

it doesn't search the node.

By the way - on Latin characters everything is working fine.

What am I doing wrong and how to fix it ?

like image 735
alexanoid Avatar asked Oct 18 '22 11:10

alexanoid


1 Answers

You need add an 'u' in your regex to transform it in a case-insensitive unicode regex. Like this:

name =~ (?ui).*ЖК Львівський маєток.*
like image 117
Bruno Peres Avatar answered Oct 21 '22 02:10

Bruno Peres