title: Escaping JSON and Regex
body: <p>I need a json-string to be used in a regex. Honestly I am a bit confused about all the escaping.. :)</p>
  
  <p>I want to replace "\o/" by something else by regex. The source string should be in a JSON.</p>
  
  <p>This is the JSON-String without escaping:</p>
  
  <pre><code>var emoticons=...
      + '{"img": "party.png","short": "\o/"},'
  ...
  </code></pre>
  
  <p>I tried to escape the slash and backslash to meet the regex' need but after that wasn't able to parse the JSON anymore:</p>
  
  <pre><code>var emoticons=...
      + '{"img": "party.png","short": "\\o\/"},'
  ...
  </code></pre>
  
  <p>How should the JSON-String look like?</p>
  
  <p>Code:</p>
  
  <pre><code>var smilies = JSON.parse(emoticons);
  text.replace(new RegExp(smilies.short,......);
  </code></pre>