Simplify (?) FindReplace helper function parseDollars

I tried to simplify/comment the quite complicated `FindReplace` helper function `parseDollars`, but to be honest, I don't know if I made it better or worse.

Let's see if someone understands the function now :laughing: 

The only architectural change is that `parseInt` is only called after we made sure `index` is indeed an integer (and not `&`).
nit: "unescaped"