in reply to another regex Question

Stop steering him in the direction of reinventing the wheel. The answer to look at HTML::Parser and HTML::TokeParser and the other HTML::* is the best. Don't try to reinvent what already works.

Cheers,
KM