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.
Merge pull request #374 from Skeeve/patch-1

Update utils.js