title: Convert Python re.sub to C#
body: <p>I'm trying to do a conversion from Python to C#</p>
  
  <pre><code>   sconvert = re.sub(r"([.$+?{}()\[\]\\])", r"\\\1", sconvert)
  </code></pre>
  
  <p>I couldn't find a C#.Net equivalent to this function to make it easy. </p>
  
  <p>From the Python Manual</p>
  
  <blockquote>
    <p>re.sub(pattern, repl, string, count=0, flags=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of
    pattern in string by the replacement repl. If the pattern isn’t found,
    string is returned unchanged. repl can be a string or a function; if
    it is a string, any backslash escapes in it are processed. That is, \n
    is converted to a single newline character, \r is converted to a
    carriage return, and so forth. Unknown escapes such as \j are left
    alone. Backreferences, such as \6, are replaced with the substring
    matched by group 6 in the pattern.</p>
  </blockquote>