Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Is there a Limit on Matching .*

by nysus (Parson)
on Jul 15, 2003 at 00:12 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found