title: Custom word boundaries in regular expression
body: <p>I am trying to match words using a regular expression, but sadly the word boundary character (\b) does not include enough characters for my taste, so I want to add more. (in that precise case, the "+" character)</p>
  
  <p>Here is what I used to have (it is C# but not very relevant) :</p>
  
  <pre><code>string expression = Regex.Escape(word);
  Regex regExp = new Regex(@"\b" + expression + @"\b", RegexOptions.IgnoreCase);
  </code></pre>
  
  <p>This particular regex did not match "C++" and I thought it was a real bummer. So I tried using the \w character in a character class that way, along with the + character :</p>
  
  <pre><code>string expression = Regex.Escape(word);
  Regex regExp = new Regex(@"(?![\w\+])" + expression + @"(?![\w\+])", RegexOptions.IgnoreCase);
  </code></pre>
  
  <p>But now, nothing gets matched... is there something I am missing?</p>