Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 chilling in the Monastery: (9)
As of 2016-02-12 06:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (389 votes), past polls