title: How to make \ a literal back slash using Regexp in JS
body: <p>I am pretty new to Regexp and it seems that the <code>\</code> is used for meta characters. My problem is I want to search this string exactly <code>\"mediaType\":\"img\"</code></p>
  
  <p>Now I also want to dynamically put a variable in for img. So I want it to be something like this </p>
  
  <pre><code>new RegExp(`\"mediaType\":\"${variable}\"`)
  </code></pre>
  
  <p>How do I write this to make it work?</p>