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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -