LIKE clause in CYPHER Query

johnc picture johnc · Dec 11, 2012 · Viewed 45.9k times · Source

It appears that LIKE is not supported in Cypher queries.

Is there any other construct that would perform the same task?

For instance:

start n = node(*) where n.Name LIKE('%SUBSTRING%') return n.Name, n;

Answer

ulkas picture ulkas · Dec 12, 2012

using regular expressions: http://neo4j.com/docs/developer-manual/current/#query-where-regex

start n = node(*) where n.Name =~ '.*SUBSTRING.*' return n.Name, n;