javascript - Remove special characters and retain only one -
I want to remove all the special characters in the beginning. Next I want to remove all the special characters when the string is finished and just want to keep one character.
Exemple:
String:
!! Online, !!
Result:
on-line,
You can use it:
'!! Online,' !!. Replace (/ ^ \ W + | (\ W) \ W * $ / g, "$ 1"); "On-line", "
Comments
Post a Comment