Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Is there a Limit on Matching .*

by nysus (Deacon)
on Jul 15, 2003 at 00:12 UTC ( #274236=note: print w/ replies, xml ) Need Help??


in reply to Is there a Limit on Matching .*

I believe the answer to your question is that that '.' is not matching over newlines. You must use the 's' modifier like so:

$chunk =~ m%<title>(.+)</title>.*<h1>(.+)</h1>%is;

Update: Removed first paragraph may have been wrong.

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff";
$nysus = $PM . $MCF;
Click here if you love Perl Monks


Comment on Re: Is there a Limit on Matching .*
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://274236]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-08-29 00:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (275 votes), past polls