Adjust `RegExp.lastIndex` after each `.replace()`