Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How to do multiple substitutions with one RegEx?

by k_manimuthu (Monk)
on May 06, 2010 at 06:38 UTC ( #838647=note: print w/ replies, xml ) Need Help??


in reply to How to do multiple substitutions with one RegEx?

$string=~s/([b-w]+)[^a]+([a]+)/uc($1)." Your Text ".uc($2)/ge;
while you use evaluation in regex part, you will be use the concat operator.


Comment on Re: How to do multiple substitutions with one RegEx?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-10-23 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (123 votes), past polls