title: C# Ignore inside of speech, while changing other values
body: <p>I am trying to make a basic translator, which changes values in the code, for example, a <code>.</code> may be <code>::</code>, e.t.c, and I can do that by using</p>
  
  <pre><code>if(code.Contains("."))
  {
        code.Replace(".", "::");
  }
  </code></pre>
  
  <p>But my problem is I don't know how to ignore it in the inside of speech, as if the sentence was "Hello.", it could be translated to "Hello::". How would I be able to stop this? (I know you can use Regex <code>"\".+?\""</code> to find speech in text)</p>