peter.mao has asked for the wisdom of the Perl Monks concerning the following question:
but I want it to become$test = "abc1 abc1 abc1 abc1 abc1";
Is there some expressionabc1 abc2 abc3 abc4 abc5
that would transform the string for me? I've been good all year; please come through for me,$test =~ s/(1)/<..something..>/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: incremental substitution w/ regexp only?
by ikegami (Patriarch) on Dec 25, 2008 at 08:46 UTC | |
by AnomalousMonk (Archbishop) on Dec 25, 2008 at 14:31 UTC | |
by ikegami (Patriarch) on Dec 25, 2008 at 14:32 UTC | |
by AnomalousMonk (Archbishop) on Dec 25, 2008 at 16:19 UTC |