I have a simple question how do I remove a \ with regex?
Thanks
I have tried it like this .replace(/\\/ig, '');
I am using javascript and classic asp
Now it works: .replace(/\\/ig, ''); somehow the first time I tried it, it were not working! – Thanks for all the quick answers!
I tested out the following and it worked (in a test bench) on the first
\(due to"\\"), but not the second\(because it was in a string, thus acting as an escape character).Are you sure that the
\you wish to replace is not just acting as an escape character and doesn’t really exist in the output?