Use this to remove special characters from a string, in other words, find a special character pattern and replace it with empty character,
str = str.replace(/[^a-zA-Z 0-9]+/g,”);
Fill in your details below or click an icon to log in:
You are commenting using your WordPress.com account. ( Log Out / Change )
You are commenting using your Twitter account. ( Log Out / Change )
You are commenting using your Facebook account. ( Log Out / Change )
You are commenting using your Google+ account. ( Log Out / Change )
Connecting to %s
Notify me of new comments via email.
Create a free website or blog at WordPress.com.
Entries (RSS) and Comments (RSS)