Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm trying to pull the title and h1 out of an HTML file (local). I figured this is a little too simple to use any of the HTML parsing modules and I'm using a simple match. The HTML file is guaranteed to have only one h1.
Here's what I'd like to do ...
... which returns a pair of undefs. If I split the match over a couple of lines, however, everything works out just fine. Here's what's working:
The best explanation I can think of is .* only matches up to a certain number of characters. My test file has 3750 characters between </title> and <h1>. Is that what's happening here? Thanks for your help. In reply to Is there a Limit on Matching .* by svsingh
|
|