Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://838647]
help
Chatterbox?
[LanX]: ha the Cuban experience
[LanX]: one strange thing I heard was that pharmacies in Vietnam are run by Russians
[LanX]: still can't believe this, must h have been a misunderstanding

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2017-02-26 04:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (371 votes). Check out past polls.