title: Javascript storing regex in a variable
body: <p>I have this line of code in javascript</p>
  
  <pre><code>var re = (http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;amp;:/~\+#]*[\w\-\@?^=%&amp;amp;/~\+#])?
  </code></pre>
  
  <p>Usually I encapsulate the regex syntax with the <code>/</code> characters but since they are found within the regex it screws up the encapsulation. Is there another way how I can store it inside the variable?</p>
  
  <p>The current slashes that seem like escape characters are part of the regex, since I am using this in c# aswell and works perfectly</p>