Avoid greedy .* matches. Your regex will only find one match because of the .* matches.
However, a much better solution for parsing standard markup is to use the tools designed for the purpose. In this case one of the HTML modules, HTML::TreeBuilder perhaps, would be appropriate. Parsing markup reliably is hard and reinventing wheels generally takes much longer than one might expect.
In reply to Re: help needed with match multiple lines
by GrandFather
in thread help needed with match multiple lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |