title: Cypher query with regular expression
body: <p>I'm trying to match nodes in a Neo4j database. The nodes have a property called "name" and I'm using regular expression in Cypher to match this. I only want to match whole words, so "javascript" should not match if I supply the string "java". If the string to match is of several words, i.e. "java script" I will do two seperate queries, one for "java" and one for "script".</p>
  
  <p>This is what I have so far: </p>
  
  <pre><code>match (n) where n.name =~ '(?i).*\\bMYSTRING\\b.*' return n
  </code></pre>
  
  <p>This works, but it does not work with some special characters like "+" or "#". So I cant search for "C++" or "C#" etc. The regular expression in the above code is just using \b for word boundary. it is also escaping it so it works correctly.</p>
  
  <p>I tried some versions of this post: <a href="https://stackoverflow.com/questions/12712754/regex-to-match-word-boundary-beginning-with-special-characters">regex to match word boundary beginning with special characters</a> but it didnt really work, maybe I did something wrong.</p>
  
  <p>How can I make this work with special characters in Cypher and Neo4j?</p>