title: Regex word search with apostrophe
body: <pre><code>highlightStr: function (body, searchString){
      console.log(searchString);
      var regex = new RegExp('(' + searchString + ')', 'gi');
      console.log(regex)
      return body.replace(regex, "&lt;span class='text-highlight'&gt;$1&lt;/span&gt;");
  }
  </code></pre>
  
  <p>Above is the code I'm using.  I want to find and replace the searchString, which could be anything. It works fine for most words, but fails when finding words with apostrophes.</p>
  
  <p>How can I modify the regex to include special characters like the appostrophe.</p>
  
  <pre><code>var body = "&lt;br&gt;I like that Apple&amp;#x2019;s.&lt;br&gt;";
  var searchString = "Apple's";
  </code></pre>
  
  <p>Thank you</p>