Created
December 1, 2015 20:22
-
-
Save sunnydoll/3bf65bf5aec91c0632f5 to your computer and use it in GitHub Desktop.
Regexp for normal chars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filterSpecialChar(text) { | |
var patt = /[^a-zA-Z0-9{}.,\?'"\[\]\(\)\-\\\/:&;\*@\s]+/; | |
if(patt.test(text)) | |
return false; | |
else | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment