问题
With Neo4j 2.1.0-M01, I just discovered that case insensitive regex match does not work with Ukrainian words, at list from web-interface browser. Say I have node with a word 'Ліга' somewhere.
MATCH (n) WHERE n.payload =~ '(?i).*ліга.*'
does not match
MATCH (n) WHERE n.payload =~ '(?i).*лІГа.*'
does not match
MATCH (n) WHERE n.payload =~ '(?i).*Ліга.*'
match Ok
Do I need some deep magic to get it working as expected? Thanks in advance!
WBR, Andrii
回答1:
Not 100% sure, but could you please check if using (?u)
helps:
MATCH (n) WHERE n.payload =~ '(?iu).*лІГа.*'
This tells the regex to work case insensitive based on unicode and not on ASCII only.
来源:https://stackoverflow.com/questions/23371028/case-insensitive-regex-for-non-ascii-strings-does-not-work