title: Detecting "\" (backslash) using Regex
body: <p>I have a C# Regex like</p>
  
  <pre><code>[\"\'\\/]+
  </code></pre>
  
  <p>that I want to use to evaluate and return error if certain special characters are found in a string.</p>
  
  <p>My test string is:</p>
  
  <pre><code>\test
  </code></pre>
  
  <p>I have a call to this method to validate the string:</p>
  
  <pre><code>public static bool validateComments(string input, out string errorString)
  {
      errorString = null;
      bool result;
  
      result = !Regex.IsMatch(input, "[\"\'\\/]+");  // result is true if no match
                                                     // return an error if match
  
      if (result == false)
          errorString = "Comments cannot contain quotes (double or single) or slashes.";
  
      return result;
  }
  </code></pre>
  
  <p>However, I am unable to match the backslash.  I have tried several tools such as regexpal and a VS2012 extension that both seem to match this regex just fine, but the C# code itself won't.  I do realize that C# is escaping the string as it is coming in from a Javascript Ajax call, so is there another way to match this string?</p>
  
  <p>It does match /test or 'test or "test, just not \test</p>