Remove special characters from a String :
var str="Ar$yan's a%re very brave, (powerful) and g@enius guys#."
var newStr = str.replace(/[^\w\s]/gi, '')
console.log(newStr)
Output:
Aryans are very brave powerful and genius guys
var str="Ar$yan's a%re very brave, (powerful) and g@enius guys#."
var newStr = str.replace(/[^\w\s]/gi, '')
console.log(newStr)
Output:
Aryans are very brave powerful and genius guys
Comments
Post a Comment