Skip to content

Instantly share code, notes, and snippets.

@Nataila
Created December 5, 2013 09:00
Show Gist options
  • Save Nataila/7802249 to your computer and use it in GitHub Desktop.
Save Nataila/7802249 to your computer and use it in GitHub Desktop.
function containSpecial(str){
var specailStr = RegExp(/[(\ )(\~)(\!)(\@)(\#) (\$)(\%)(\^)(\&)(\*)(\()(\))(\-)(\_)(\+)(\=) (\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(\/) (\<)(\>)(\?)(\)]+/);
return (specailStr.test(str));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment