title: Treat every whitespaces as the same character in Regex
body: <p>I made a regex to highlight keywords found in a text by another tool.</p>
  
  <pre><code>new RegExp(highlightedKeywords.map(v =&gt; `\\b${v}\\b`).join('|') || /.^/, 'gi'), match =&gt; `&lt;mark&gt;${match}&lt;/mark&gt;`)
  </code></pre>
  
  <p>I would like to make this regex treat every whitespaces as the same because the tool who extract keywords from the text convert every whitespace as space, so for example I have a keyword "the cat" not found because the actual text is "the\ncat".</p>
  
  <p>I don't want to ignore whitespaces because "the cat" should not match "thecat" but I would like to match "the\tcat" or even "the\n \tcat"</p>