title: Replacing characters between two characters
body: <p>I'm trying to manipulate a string and I want to remove some characters in it.</p>
  
  <p>Example scenario:</p>
  
  <pre><code>abc-def-c?p=2&amp;x=5&amp;z=6
  </code></pre>
  
  <p>I want to replace all chars starting from <code>p</code> and ending with the char after next <code>&amp;</code> or <code>?</code> with empty chars. Deleting them in a way.</p>
  
  <p>Input: <code>abc-def-c?p=2&amp;x=5&amp;z=6</code></p>
  
  <p>Output: <code>abc-def-c?x=5&amp;z=6</code></p>
  
  <p>I know I can achieve this with <code>Substring</code> ,<code>IndexOf</code> and <code>Replace</code> but sadly there is a problem that p,x,y parts may not be in this order all the time. I need something which would find just the part and replace it.</p>
  
  <p>My regex skills are not that great so any help is appreciated.</p>