Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: simple regEx

by Corion (Patriarch)
on Nov 09, 2005 at 14:22 UTC ( [id://507078]=note: print w/replies, xml ) Need Help??


in reply to simple regEx

Your use of \Q...\E is too general - it also escapes the parentheses you wanted to use for capturing and your wildcards. Try it with:

$line =~ m@\Qonmouseout="cs()">\E(.*)\Q</a>\E@;

Update: After looking through wws analysis and seeing that my code doesn't work - you also need the /s switch to make . match newlines, as your string contrains newlines:

$line =~ m@\Qonmouseout="cs()">\E(.*)\Q</a>\E@s;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-19 07:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found