Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Regexp substitution using variables

by MikeTaylor (Acolyte)
on Nov 25, 2020 at 22:47 UTC ( [id://11124235]=note: print w/replies, xml ) Need Help??


in reply to Re: Regexp substitution using variables
in thread Regexp substitution using variables

Thanks, Ken, this is helpful. Point taken on Class->new, too.

The problem with this class, like the solutions above that use s/(?$flags:$pattern)/$replacement/ directly, is that it doesn't handle back-references. (That's true even with the \Q removed from the definition of $re_part in the class constructor.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-03-28 13:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found