Javascript: how to xpath string at a[integer]?
<p>I have an xpath string like the following:</p>

<pre><code>/html/body/table/a/img
/html/body/table/a[3]/img
</code></pre>

<p>Sometimes there is [integer], other times there isn't.</p>

<p>I would like a regex to split a string which works with "a" or "a[integer]".</p>

<pre><code>string.split(/a[0-9]/);
</code></pre>
