Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2017-09-21 00:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (241 votes). Check out past polls.

    Notices?