Returning node where a string appears in ANY of its properties

I would like to be able to search for the existence of a certain string in ANY of the properties of a given node.

For example, take: match(mynode) where mynode.names contains "Alfred Pennyworth" return mynode

except I want to do this for ALL of the properties. If mynode has a properties "names" "college" "fingers" "thumbtack_weight_in_tons" etc etc, I want to be able to see if ANY of those properties contain the string "Alfred Pennyworth".

Theoretically, if I knew all the properties of every node, I could search them one at a time, but I'm working with a very irregular data set.

Any help?

Hello @drf57 and welcome to the Neo4j community :slight_smile:

MATCH (n)
WHERE any(k IN keys(n) WHERE n[k] =~ "(?i).*"+"Alfred Pennyworth"+".*")
RETURN n

Regards,
Cobra