How to split a deliminated string with encapsulation and escapes
<p>I would like to split a string deliminated by a character such as ‘&amp;’, but in the case where some values contain the deliminator I would like to escape with double quotes.  What is an elegant approach to splitting while ignoring the deliminating characters that have been escaped while also accounting for escape character escapes?  </p>

<p>For example split this string properly</p>

<pre><code>var1=asdfasdf&amp;var2=contain””quote&amp;var3=”contain&amp;delim”&amp;var4=”contain””both&amp;”
</code></pre>

<p>Into:</p>

<pre><code>var1=asdfasdf
var2=contain"quote
var3=contain&amp;delim
var4=contain"both&amp;
</code></pre>

<p>Incidentally, I am thinking Regex...</p>
