title: Php highlight search terms using preg_replace - character encoding issues
body: <p>Hy guys, I need to highlight some searched words, in the result, and i was thinking to use pre_replace, and it works just fine, until i use accented characters.</p>
  
  <p>So this is my code:</p>
  
  <pre><code>preg_replace("/(?&lt;!\[)(\b{$search}\b)(?!\])/i", $replace, $string);
  </code></pre>
  
  <p>And if I'm looking for the word "mokus", it finds it, but leaves out "mókus",</p>
  
  <p>The same thing happens the other way around.</p>
  
  <p>And ideas? Thanks in advance.</p>