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

Re^3: trouble with regular expressions

by moritz (Cardinal)
on Nov 06, 2012 at 15:00 UTC ( #1002499=note: print w/ replies, xml ) Need Help??

in reply to Re^2: trouble with regular expressions
in thread trouble with regular expressions

my old code matches the ;doc and gives result such as ssscument.write('<iframe ...shortened...</iframe>');

No, it does not:

use 5.010; use strict; use warnings; $_ = q[;document.write('<iframe src="any url" scrolling="auto" framebo +rder="no" align="center" height="15" width="15"></iframe>');]; s/(\;do.*)(\<\/iframe\>\'\)\;)/sss/; say __END__ sss

Anyway, it's easier if you use a different delimiter so that you don't have to escape the forward slashes:


Comment on Re^3: trouble with regular expressions
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2015-11-25 12:18 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 (674 votes), past polls