Neo4j 2.0 wildcard search on label names

Viewed 3465

When dealing with properties in Cypher, you can use regular expressions to match property values like so:

Match (n)-[:IS_A]-() where (n:Course_Driving_001) and (n.name =~ '(?i).*criteria.*' or n.description =~ '(?i).*criteria.*')   return distinct n limit 20;

I'd like to do the same thing with a label name. I'd like to get all unique labels that contain a certain string. Something like:

 Match (n)-[:IS_A]-() where (n:Course_*_001) return distinct n;

Can this be done is Cypher? or the RestAPI? Regular expressions?

I'm using Neo4j 2.0 Release.

1 Answers
Related