Search code examples
regexcyphermemgraphdb

Can I use case insensitive regex in Cypher query?


I am using Memgraph Platform 2.6.4 and I can't seem to use (?i) for case insensitive regular expression. It throws "Invalid special open parenthesis" error. What is the best way to approach this?


Solution

  • Memgraph does not support case insensitive flag ((?i)), but you can use toLower function to turn your strings into lowercase and compare them with another lowercase string. Here is the documentation on regular expressions and on toLower function.