Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-22-2021 02:46 PM
match (n) where n.name = 'Okay?Okay?' return n
This can successfully return the node from the graph. However,
match (n) where n.name =~ '(?i)Okay?Okay?' return n
This returns nothing.
Solved! Go to Solution.
04-23-2021 03:07 PM
Hi @lingvisa
Sorry, My description was incorrect.
The "any character" is period.
The question mark indicates zero or one occurrences of the preceding element.
You can find "Okay?Okay?", "okay?okay?", "Okay1Okay2", "OkayAOkayB".
MATCH (n)
WHERE n.name =~ '(?i)Okay.Okay.'
RETURN n
04-22-2021 03:31 PM
Hi @lingvisa
The "=~ '(?i)Okay?Okay?'" is a regular expression.
This question mark in a regular expression means some character.
If you write a backslash before the question mark, it will work correctly.
MATCH (n)
WHERE n.name =~ '(?i)Okay\?Okay\?'
RETURN n
04-23-2021 11:15 AM
Shouldn't the question mark '?' represent any character? If that's the case, it does not have to be escapeted?
04-23-2021 03:07 PM
Hi @lingvisa
Sorry, My description was incorrect.
The "any character" is period.
The question mark indicates zero or one occurrences of the preceding element.
You can find "Okay?Okay?", "okay?okay?", "Okay1Okay2", "OkayAOkayB".
MATCH (n)
WHERE n.name =~ '(?i)Okay.Okay.'
RETURN n
All the sessions of the conference are now available online