Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>UPDATED</strong></p> <p>Here's a more practical solution to parsing this. Encode the part you don't want split by replacing it with a code so here I'm translating <code>";"</code> to <code>"||"</code> now you can split with just a <code>.split(';')</code> method, then replace the quoted semicolon back to <code>";"</code> when iterating the split strings. </p> <p>You could change this "||" code to any <em>code</em> like some funky unicode characters, pairs of scissors perhaps?!? ✁✁ :)</p> <p>example: <a href="http://jsfiddle.net/pxfunc/qXrVr/5/" rel="nofollow">http://jsfiddle.net/pxfunc/qXrVr/5/</a></p> <pre><code>var str = "randomnessstuff;morestuff and a semicolon in quotes : \";\";some more stuff", results = document.getElementById("results"), quotedSemicolon = '";"', quotedSemicolonCode = '"||"'; // use bar bar as a replacement code for quoted semicolons results.innerHTML = ""; // replace then split the string to an array object var strArr = str.replace(quotedSemicolon, quotedSemicolonCode).split(';'); results.innerHTML += "&lt;b&gt;Split&lt;/b&gt;&lt;br&gt;"; for (s in strArr) { // replace back the quoted semicolons results.innerHTML += strArr[s].replace(quotedSemicolonCode, quotedSemicolon) + '&lt;br&gt;'; } </code></pre> <hr> <p><em>previous solution</em> <a href="http://jsfiddle.net/pxfunc/qXrVr/1/" rel="nofollow">http://jsfiddle.net/pxfunc/qXrVr/1/</a> used regex <code>/(;)(?![";"])/</code> to split ... nevermind that though ... the above is simpler</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload