title: regex behaves differently in c# than on regexr.com
body: <p>I looked around for a regex that will extract a url from a string and found this one.</p>
  
  <pre><code>\b(([\w-]+://?|www[.])[^\s()&lt;&gt;]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))
  </code></pre>
  
  <p>The problem is when I test it on the following string at regexr.com it matches properly, but not when I use it in c#.</p>
  
  <p><strong>Test String:</strong></p>
  
  <pre><code>  "&lt;a style=\"color: blue;\" target=\"_blank\" href=\"http://www.fedex.com/Tracking?action=track&amp;tracknumbers=187880016501597\"&gt;Track FedEx Ground 187880016501597&lt;/a&gt;"
  </code></pre>
  
  <p><strong>Regexr Match:</strong></p>
  
  <pre><code>  "http://www.fedex.com/Tracking?action=track&amp;tracknumbers=187880016501597"
  </code></pre>
  
  <p><strong>C# Match:</strong> </p>
  
  <pre><code>  "http://www.fedex.com/Tracking?action=track&amp;tracknumbers=187880016501597"&gt;"
  </code></pre>
  
  <p>I can't figure out why the c# is adding the "> at the end of the matching string. I think it may have something to do with the escape character that comes before it in the original test string. I'm looking to get the same result that regexr.com gets. Let me know if anyone has any ideas, thanks.</p>