rawurldecode and regexp for splitting words with and without quotes in javascript?
<p>so here is the case:</p>

<p>i have a string in php (containts 2 words):</p>

<pre><code>windows "mac os"
</code></pre>

<p>i encode it with rawurlencode and put it in the URL after ?name= in an anchor.
when i click it i see the following in the browsers url.</p>

<p>index.php?name=windows%20%5C%22mac%20os%5C%22</p>

<p>and then i get it with javascript with jquery bbq.</p>

<pre><code>var string = $.deparam.querystring();
document.write(string.name);
</code></pre>

<p>and get:</p>

<pre><code> windows \"mac os\"
</code></pre>

<p>i want to get windows "mac os" when i output it with javascript. and then i want to split the words to:</p>

<pre><code> array[0] = windows
 array[1] = mac os
</code></pre>

<p>the first step i think should be to get the string with rawurldecode but for javascript so i will get windows "mac os" rather than windows \"mac os\"?</p>

<p>and then the second step should be what regexp to use in javascript split() to split it to the words in the array above?</p>

<p>ive tried a numerous options but none is working. im stuck here..and its really frustrating. any help with these 2 steps would be appreciated</p>
