Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: qr// and user provided regex patterns...

by ikegami (Pope)
on Aug 04, 2009 at 23:53 UTC ( #785935=note: print w/ replies, xml ) Need Help??


in reply to Re^2: qr// and user provided regex patterns...
in thread qr// and user provided regex patterns...

Using the eval works great for matches : $pattern = eval "qr$pattern" or die $@;

No, it doesn't.

First of all, it doesn't work at all if $pattern actually contains a pattern.

And then there are issues with improper escaping. If you pass /a\+/, it won't match "a" followed by "+" as desired.


Comment on Re^3: qr// and user provided regex patterns...
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2015-02-01 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My top resolution in 2015 is:

















    Results (262 votes), past polls