| Author |
Reg. Expr. using Pattern - Invalidate a String, if it contains certain characters
|
Sam Gehouse
Ranch Hand
Joined: Jul 21, 2003
Posts: 281
|
|
I admit that I am not good with regular expression. If any of you is good with regular expression, could you please suggest a pattern that will help me?
This is the problem statement:
If an input String contains any of the following 16 characters (e.g. !, @, =, etc.) that that input String is invalid.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Check out character classes on the java.util.regex.Pattern Javadoc page.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Reg. Expr. using Pattern - Invalidate a String, if it contains certain characters
|
|
|