title: Regex match a sentence in a paragraph that contains new lines
body: <p>I basically have a paragraph of text in a html div. By clicking/activating a button, I would like to highlight a certain length of text. Hence, I would need to locate its index and add spans with class =highlight to them.</p>
  
  <p>Hence, I would like to match a sentence in a innerHtml text such as:</p>
  
  <pre><code>var text = "The quick brown fox jumps over the lazy dog".
  </code></pre>
  
  <p>However, the paragraph might cut the sentence to multiple lines such as:</p>
  
  <pre><code>innerHTML = 
  "The quick brown 
  fox jumps over 
  the lazy dog"
  </code></pre>
  
  <p>And I cannot "ulter" the innerHTML in anyway such as removing spaces/new lines from the text.</p>
  
  <p>I cannot seem to think of or find the correct regex sequence to implement this.</p>
  
  <p>This does not work: </p>
  
  <pre><code>var search_regexp = new RegExp(text, 'm');
  innerHTML.search(search_regexp);
  </code></pre>