title: PHP Regex Word Boundary exclude underscore _
body: <p>I'm using regex word boundary \b, and I'm trying to match <code>foo</code> in the following <code>$sentence</code> but the result is not what I need, the <code>underscore</code> is killing me, I want underscore to be word boundary just like hyphen or space:</p>
  
  <pre><code>$sentence = "foo_foo_foo foo-foo_foo";
                X   X   X  YES  X   X
  </code></pre>
  
  <p>Expected:</p>
  
  <pre><code>$sentence = "foo_foo_foo foo-foo_foo";
               YES YES YES YES YES YES
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>preg_match("/\bfoo\b/i", $sentence);
  </code></pre>