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

Answer: Subroutines in a regex?

by busunsl (Vicar)
on Apr 04, 2001 at 19:06 UTC ( #69689=categorized answer: print w/replies, xml ) Need Help??

Q&A > regular expressions > Subroutines in a regex? - Answer contributed by busunsl

use
s/SUM(\d*)/sum($1)/eg
this will execute the subroutine.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[marto]: interesting review of the low end Ryzen offerings

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2017-07-27 15:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (418 votes). Check out past polls.