title: C# Unrecognized escape sequence
body: <p>I have following Regex on C# and its causing Error: C# Unrecognized escape sequence on <code>\w</code> <code>\.</code> <code>\/</code>  .</p>
  
  <pre><code>string reg = "&lt;a href=\"[\w\.\/:]+\" target=\"_blank\"&gt;.?&lt;img src=\"(?&lt;imgurl&gt;\w\.\/:])+\"";
  Regex regex = new Regex(reg);
  </code></pre>
  
  <p>I also tried</p>
  
  <pre><code>string reg = @"&lt;a href="[w./:]+" target=\"_blank\"&gt;.?&lt;img src="(?&lt;imgurl&gt;w./:])+"";
  </code></pre>
  
  <p>But this way the string "ends" at href="    <code>"</code>-char</p>
  
  <p>Can anyone help me please?</p>