... my $reg = { 'open', qr{<table>}, 'close', qr{</table>} }; while( <DATA> ){ if(m#$reg->{open}# ... m#$reg->{close}#){ /$reg->{open}|$reg->{close}/ and next; # print or whatever ... } } ... # STDOUT: # <tr><td>First Table</td</tr> # <tr><td>Second Table</td</tr> # <tr><td>Third Table</td</tr> __DATA__ <table> <tr><td>First Table</td</tr> </table> <table> <tr><td>Second Table</td</tr> </table> <table> <tr><td>Third Table</td</tr> </table>
In reply to Re: regexp text parsing issue.
by sh1tn
in thread regexp text parsing issue.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |