Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2015-11-25 15:42 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (681 votes), past polls