Split to get the text between separators?
<p>I am making a cross domain AJAX request, and because of this, I can't pass the original array from the PHP page to my HTML page. Instead, the request gets the results as a string. I have it set up so that the syntax looks like this:</p>

<pre><code>([SCHOOL] Name [/SCHOOL][STATUS] Status [/STATUS])
([SCHOOL] Other name [/SCHOOL][STATUS] Other status [/STATUS])
</code></pre>

<p>On my HTML page, I want to be able to form an array from these different values, in the form of:</p>

<pre><code>Array (
    [0] =&gt;
        [0] Name
        [1] Other
    [1] =&gt;
        [0] Name 
        [1] Other status
)
</code></pre>

<p>This way, I can use a <code>for</code> loop to get specific values. </p>

<p>The only problem with is that <code>split</code> only does just that, splits things. Is there a way in JS to find the text within separators, and form an array from it? In the example again, it'd find all text within the parenthesis, and form the first array, then within that array, use the text between <code>[SCHOOL][/SCHOOL]</code> for the first object, and use the text between <code>[STATUS][/STATUS]</code> for the second object.</p>
