title: C# replace string if string has other characters from both ends
body: <p>I want to replace a string if it is a part of another string from both ends. </p>
  
  <p>Say for example a string +35343+3566. I want to replace +35 with 0 only if it is surrounded with characters from both sides. So desired outcome would be +35343066.</p>
  
  <p>Normally I'd use <code>line.Replace("+35", "0")</code> and perhaps <code>if-else</code> to meet a condition</p>
  
  <pre><code>string a = "+35343+3566";
  
  string b = a.Replace("+35", "0");
  </code></pre>
  
  <p>I would want 'b = +35343066 and not b = 0343066`</p>