Hi Readers,
Some times we have to remove special characters from string. Here is the java script + Regexp code to remove characters from java-script string:
Some times we have to remove special characters from string. Here is the java script + Regexp code to remove characters from java-script string:
updatedString = Stringtobefiltered.replace(/[^\w\s]/gi, '')
One more regex expression which is generally required in many cases which allow users to imput alphanumeric characters and three special characters:
/^[a-zA-Z0-9_.:]*$/
Hope this will help you :)
 
No comments:
Post a Comment