Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-15-2022 05:34 PM
Hello. I'm looking for the solution to this exercise using a regular expression. Here are the instructions:
MATCH (m:Movie)
WHERE m.tagline =~'love'
RETURN m
and
MATCH (m:Movie)
WHERE m.tagline =~'love.*'
RETURN m
Both returned (no changes, no records)
.
Thanks for any insight. 🙂
Solved! Go to Solution.
02-16-2022 01:10 AM
Hello @brucemcminn and welcome to the Neo4j community
Can you try this query?
MATCH (m:Movie)
WHERE m.tagline =~ '(?i).*love.*'
RETURN m.title AS title
You can have more information here.
Regards,
Cobra
02-16-2022 01:10 AM
Hello @brucemcminn and welcome to the Neo4j community
Can you try this query?
MATCH (m:Movie)
WHERE m.tagline =~ '(?i).*love.*'
RETURN m.title AS title
You can have more information here.
Regards,
Cobra
04-20-2022 10:57 AM
Thanksfor the kind welcome! I learned a little bit more about regex in the last few weeks and see that I need to add the .*
at the beginning as well. Using case insensitive (?i)
makes it more robust.
Sorry I didn't see your reply sooner.
All the sessions of the conference are now available online