remove only onespecial characters from string javascript w3schools code example
Example 1: remove non alphanumeric characters javascript
input.replace(/\W/g, '') //doesnt include underscores
input.replace(/[^0-9a-z]/gi, '') //removes underscores too
Example 2: remove substring from string javascript
var ret = "data-123".replace('data-','');