in reply to Re^3: Increment a string with letters and numbers
in thread Increment a string with letters and numbers
Using the solution given above:
13:09 >perl -wE "my $s = 'EVO:001 xyz345 EVO:456'; $s =~ s/(EVO:)(\d+) +/$1.++($_=$2)/eg; say $s;" EVO:002 xyz345 EVO:457 13:13 >
Hope that helps,
Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Increment a string with letters and numbers
by emptyshell (Initiate) on May 21, 2013 at 04:55 UTC |