title: Replace substring which comes in middle of string only
body: <p>I want regx pattern in C# which find substring in any string which comes in middle only. Let say ,</p>
  
  <pre><code>Input : "toprohitpop rohittoppop toppoprohit" 
  </code></pre>
  
  <p>find substring : <code>"rohit"</code></p>
  
  <p>Replace with : <code>"$$$$"</code></p>
  
  <p>Output : <code>"top$$$$pop rohittoppop toppoprohit"</code> </p>
  
  <p>if substring "rohit" comes in left or right of the string then it should not be replaced.Substring "rohit" will only be replaced when it comes in middle of string .</p>
  
  <p>Thanks in advance.</p>