This should do what you want, and it takes care of all the <b> and </b> cases. Don't ask me to explain it, though.while (<DATA>) { print "$1\n" if m/gif"><\/td><td>(?:<b>)?([A-Z0-9\(\)\[\]]+)(?:<\/ +b>)?<\/td>(?:<td>(?:<b>)?([A-Z0-9\(\)\[\]]+)(?:<\/b>)?<\/td>)?<\/tr>/ +; } __DATA__ gif"></td><td>XXX</td></tr> gif"></td><td><b>XXX</td></tr> gif"></td><td><b>XXX</b></td></tr> gif"></td><td><b>XXX</td><td><b>YYY</td></tr>
In reply to Re: Pattern Match Problem
by TedPride
in thread Pattern Match Problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |