Replace a String between two Strings
<p>Let's say we have something like:</p>

<pre><code>&amp;firstString=someText&amp;endString=OtherText
</code></pre>

<p>And I would like to replace "someText" with something else. What is the best way to do this considering the fact that I do not know what someText might be (any string) and all I know is that it will be surrounded with &amp;firstString= and &amp;endString=</p>

<p>Edit: sorry looks like this is not clear enough. I do not know what "someText" might be, the only information I have is that it will be between &amp;firstString= and &amp;endString=</p>

<p>I was thinking about using split multiple times but it sounded ugly ..</p>
