vennila has asked for the wisdom of the Perl Monks concerning the following question:
In the above code,I want to upper case both the $1 and $2 in the string.How to do it?use strict; use warnings; my $string="welcomezxyaaaaa"; $string=~s/([b-w]+)[^a]+([a]+)/uc($1)/ge; print $string;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to do multiple substitutions with one RegEx?
by graff (Chancellor) on May 06, 2010 at 07:04 UTC | |
|
Re: How to do multiple substitutions with one RegEx?
by almut (Canon) on May 06, 2010 at 07:09 UTC | |
by vennila (Novice) on May 06, 2010 at 07:38 UTC | |
|
Re: How to do multiple substitutions with one RegEx?
by k_manimuthu (Monk) on May 06, 2010 at 06:38 UTC |