Suppose there is a node, Student
, that has a property Name
.
MATCH (s:Student) were s.Name contains "stack"
RETURN s.Name
the output should be like : stack, Stack, STACK etc
Suppose there is a node, Student
, that has a property Name
.
MATCH (s:Student) were s.Name contains "stack"
RETURN s.Name
the output should be like : stack, Stack, STACK etc
You can make the comparison on the upper/lower case version of each, for example:
MATCH (s:Student)
WHERE toLower(s.Name) CONTAINS toLower("stack")
RETURN s.Name
The regular expression operator, =~
, supports case insensitive searches via the (?i)
modifier.
This query is the equivalent of yours, except it is case insensitive:
MATCH (s:Student)
WHERE s.Name =~ '(?i).*stack.*'
RETURN s.Name
© 2022 - 2024 — McMap. All rights reserved.
CONTAINS
to work without case sensitivity but it is case insensitive. Here is a similar question #44251310 where somebody wanted to search on a value with CONTAINS but have it match all cases of that value. – Curley