title: Match and replace a substring while ignoring special characters
body: <p>I am currently looking for a way to turn matching text into a bold html line. I have it partially working except for special characters giving me problems because I desire to maintain the original string, but not compare the original string.</p>
  
  <p>Example:</p>
  
  <p>Given the original string:</p>
  
  <pre><code>Taco John's is my favorite place to eat.
  </code></pre>
  
  <p>And wanting to match:</p>
  
  <pre><code>is my 'favorite'
  </code></pre>
  
  <p>To get the desired result:</p>
  
  <pre><code>Taco John's &lt;b&gt;is my favorite&lt;/b&gt; place to eat.
  </code></pre>
  
  <p>The way I'm currently getting around the extra quotes in the matching string is by replacing them</p>
  
  <pre><code>let regex = new RegExp('('+escapeRegexCharacters(matching_text.replace(/[^a-z 0-9]/gi,''))+')',"gi")
  let html= full_text.replace(/[^a-z 0-9]/gi,'').replace(regex, "&lt;b&gt;$1&lt;/b&gt;")}}&gt;&lt;/span&gt;
  </code></pre>
  
  <p>This almost works, except that I lose all punctuation:</p>
  
  <pre><code>Taco Johns &lt;b&gt;is my favorite&lt;/b&gt; place to eat
  </code></pre>
  
  <p>Is there any way to use regex, or another method, to add  tags surrounding a matching phrase while ignoring both case and special characters during the matching process?</p>
  
  <p><strong>UPDATE #1:</strong></p>
  
  <p>It seems that I am being unclear. I need the original string's puncuation to remain in the end result's html. And I need the matching text logic to ignore all special characters and capitalization. So <code>is my favorite</code> <code>is My favorite</code> and <code>is my 'favorite'</code> should all trigger a match.</p>