title: preg_match to .NET equivalent
body: <p>I have the following code in PHP:</p>
  
  <pre><code>    if (preg_match('@^[a-z0-9/._-]+$@i', $script)
        &amp;&amp; !preg_match('@([.][.])|([.]/)|(//)@', $script))
  </code></pre>
  
  <p>I'm making the assumption that the predicate for the <code>if</code> statement returns true for the string <code>js/core.js</code>.</p>
  
  <p>How would I translate this to C#? The dumb translation is as follows:</p>
  
  <pre><code>if(Regex.IsMatch(script,"@^[a-z0-9/._-]+$@i")
     &amp;&amp; !Regex.IsMatch(script,"@([.][.])|([.]/)|(//)@"))
  </code></pre>
  
  <p>but I suspect that the <code>@</code> symbol has meaning associated with it that I can't get to the bottom of. A translation to .NET regex would be nice, but I'm entirely familiar with .NET regex, so an explanation of the relevant syntax differences would suffice.</p>
  
  <p>Many thanks.</p>