Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Maybe Escape in Dynamic RegExps

by Zaxo (Archbishop)
on Apr 30, 2004 at 08:27 UTC ( #349360=note: print w/replies, xml ) Need Help??


in reply to Maybe Escape in Dynamic RegExps

This does what you want. my $re = qr/(?<!\Q$c\E)\Q$d\E/;
The \Q . . \E pair is like quotemeta. I've changed the names to protect sort. Extra ( . . ) delimiter pair is cut.

After Compline,
Zaxo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://349360]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-10-18 18:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (250 votes). Check out past polls.

    Notices?