1

Code from LIKE clause in CYPHER Query

MATCH (n) WHERE n.name =~ '(?i).*SUBSTRING.*' RETURN n;

results in

Expected 1 to be a java.lang.String, but it was a java.lang.Long (cause of =~)

Is there a way to for strings case insensitive in all possible places?

Community
  • 1
  • 1
Pavel Vanchugov
  • 383
  • 1
  • 3
  • 16

1 Answers1

3

If

MATCH (n) WHERE str(n.name) =~ '(?i).*SUBSTRING.*' RETURN n;

works then you've got a node with a name property that isn't a String, and that's why the error

Luanne
  • 19,145
  • 1
  • 39
  • 51