title: str_replace: Match whole word only
body: <p>Since <code>str_replace()</code> matches ":Name" two times in ":Name :Name_en" I want to match the results for the whole word only. I wanted to switch to <code>preg_replace()</code> because of <a href="https://stackoverflow.com/questions/9436002/str-replace-for-distinct-word">this answer</a>.</p>
  
  <pre><code>$str = ":Name :Name_en";
  echo $str . chr(10);
  $str = preg_replace('/\b' . ':Name' . '\b/i', '"Test"', $str);
  echo $str;
  </code></pre>
  
  <p>But this doesn't work because of the colon. No replacement takes place. How would the RegExp will look like?</p>
  
  <p><code>\b</code> is the word boundary. But I think a colon doesn't belong to such a word boundary.</p>