I use .replace(/([0-9])/, '$1' + 1); for string for replace number to number + 1, but doesn't work, I know it's string and integer, but how to this in JS?
that would evaluate as .replace(/([0-9])/, '$11'); which is probably not what you want, you'd need to use a function to perform the replacement that you're after.
.replace(/([0-9])/, '$11');which is probably not what you want, you'd need to use a function to perform the replacement that you're after.