[Javascript] regexp - how to exclude a substring?

Paul Novitski paul at novitskisoftware.com
Mon May 23 03:59:20 CDT 2005


Oops:

At 01:37 AM 5/23/2005, I wrote:
>If I were to split on <TAG such as "<div" then I'd have much fewer array 
>elements to walk through looking for my desired close-tag:
>
>    0   div id="wrapper">
>    1    div><p>Here's some content</p></div>
>    2    div>Here's some other content</div></div><ul>
>    ...

This example should have been:

    0    id="wrapper">
    1   ><p>Here's some content</p></div>
    2   >Here's some other content</div></div><ul>
    ...

since whatever the array is split with, in this case the string "<div", 
will not show up in the array elements.

P. 





More information about the Javascript mailing list