"Hal E. Fulton" <hal9000 / hypermetrics.com> writes:
> IIRC you can use the multiline modifier "m" on
> the RE. I haven't tried this:
> 
>   str =~ /(<html>.*<\/html>)/m

But when parsing HTML, you probably shouldn't be using REs at all.
This perfectly legal HTML will confuse that RE:

<html>
<!-- You can put </html> in a comment -->
</html>

If you need to parse HTML, use an HTML parser; there will always be a
(usually simple) way to defeat a regular expression.  "But I can
control the HTML!", I hear you (generic) say.  Sure you can-- now.
But what happens a year down the road when someone else is in charge
of generating it?  Best to be safe and do it the right way from the
start.

-=Eric
-- 
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
		-- Blair Houghton.