Can any one tell me the regular expression for textfield which should not allow following characters and can accept other special characters,alphabets,numbers and so on :
+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ @ &
this will not allow string that contains any of the characters in any part of the string mentioned above.
^(?!.*[+\-&|!(){}[\]^"~*?:@&]+).*$
Brief Explanation
^
(?!.*[+\-&|!(){}[\]^"~*?:@&]+)
.*
*
[+\-&|!(){}[\]^"~*?:@&]+
+
+
\-
&|!(){}[” «&|!(){}[
\]
^"~*?:@&” «^"~*?:@&
.*
*
$
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments