I need to replace special characters from a string, like this:
this.value = this.value.replace(/\\n/g,\'\');
Except for the regex part, I need
Try:
this.value = this.value.replace(/\w|-/g, '');
Reference: