Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-23-2020 11:36 AM
Hello all,
I am trying to query using regular expression in py2neo. However, I ran this query, but It did not work. I tried running the same query directly in Cypher and it worked. I do not know what I am missing.
I appreciate any help.
Thanks.
Bader
propertyNode = tx.run("MATCH (n) WHERE n.name=~(?i)$x(s?) RETURN n.id, labels(n)", x=word).data()
09-23-2020 12:24 PM
Have you tried:
propertyNode = tx.run("MATCH (n) WHERE n.name=~'(?i)' + $x +'(s?)' RETURN n.id, labels(n)", x=word).data()
09-23-2020 03:03 PM
It did not work either. I want to match keywords like cartype or carType.
09-24-2020 08:59 AM
What are you using (s?)
for?
This actually works:
return "carType"=~ '(?i)' + "car" + '\S+'
All the sessions of the conference are now available online