Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2016-09-28 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (518 votes). Check out past polls.