anyone knows how (if at all possible) to do
string = string.replace(/([\d]+)/g, int(’$1’) + 1))?
replacing 0 with 1,
223 with 224
etc
without writing a complex loop?
[size=1][color=red]modEdit: Merged threads.[/color][/size]
is it possible to replace patterns in a string, after performing simple math over them, like increasing all the numbers in a string by 1
string = string.replace(/([\d]+)/g, int(’$1’) + 1))?
without writing a complex loop?