Tuesday, August 12, 2008

Regular Expression in Java

For the string which should contain at least one number
(([0-9]+[a-zA-Z])|([a-zA-Z]+[0-9]))[a-zA-Z0-9]*


For the string which should contain at least one character in upper case
(([A-Z]+\\w)|(\\w+[A-Z]))[\\w]*

No comments:

Post a Comment