matching this html element in regex? (without lazy matching!) -
i'd match between tags.
what's regex that?
a bit
<tr[^>]*>.*?</tr>
but i'd not use lazy evaluation.
i want match each pair regex above, not using lazy evaluation.
instead of matching lazily, use negative lookahead (if flavour supports that). example translate to
<tr[^>]*>((?!</tr>).)*</tr>
of course, should not use regex parse html, might have guessed comments question. =) these expressions may fail horribly on nested tags, comments, , javascript.
Comments
Post a Comment