Question: 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!

Answer: 
I tested out the following and it worked (in a [test bench](http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_replace2)) on the first `\` (due to `"\\"`), but not the second `\` (because it was in a string, thus acting as an escape character).

```
<script type="text/javascript">
var str="\\ \ ";
document.write(str.replace(/\\/ig,"replaced"));
</script>

```

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?
in python

```
re.sub(r'\\', '', text)

```