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

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -