Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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


Comment on Re: Maybe Escape in Dynamic RegExps
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2015-07-05 22:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls