Update utils.js

I think /\\/g is wrong as it will remove every \ from the string. I think, the usual way of keeping the following character is more appropriate.