in reply to Increment a string with letters and numbers
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
|
|---|