More or less same procedure as yours but in one expression. Probably not much of an improvement...
while(<DATA>) { s/(\D+)(0*)(\d+)/sprintf("%s%07d",$1,$3+1)/e; print; } __DATA__ EVO:0000023 EVO:0000099 EVO:0010099 EVO:9999999
In reply to Re: Increment a string with letters and numbers
by hdb
in thread Increment a string with letters and numbers
by mrguy123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |