don't use the pipe, use a character class: 
```
var val = item.replace(/[,#\s]/g, '');
```
The pipe is for when you're doing multichar "or" matching, like `replace(/(cat|mouse|dog)/g, 'critter')`