Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: A regex on the same content fails and works, with conditions

by snopal (Pilgrim)
on Oct 22, 2007 at 13:07 UTC ( #646435=note: print w/replies, xml ) Need Help??


in reply to A regex on the same content fails and works, with conditions

I get the impression that the data in $html and the data in $item_id is not exactly the same. One thing that might not be the same is newlines. Newlines don't play well with regular expressions unless you tell your expression that you want it to ignore them in the buffer variable.

my ($other, $author) = $html =~ \?author=(.*?)">(.*)<\/a>/s; #---------------------------------------------------------^

Just a stab in the dark here, assuming all other things are equal.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2020-10-29 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (271 votes). Check out past polls.

    Notices?