Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 perusing the Monastery: (11)
As of 2014-10-20 08:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (73 votes), past polls