jQuery in Action, 3rd edition
The moose likes Other Languages and the fly likes regular expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "regular expression" Watch "regular expression" New topic

regular expression

Bushra Binte
Ranch Hand

Joined: Nov 07, 2006
Posts: 60
does any one have an idea how regular expression(regex) for checking whether a string would contain:

1. atleast one letter

2. atleast one number

3. atleast one special charater (@,$,%,&)

shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
Try [a-zA-Z0-9@$%&]

SCJP 1.5(97%) My Blog
Henry Wong

Joined: Sep 28, 2004
Posts: 20142



Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
I agree. Here's the link: http://aspose.com/file-tools
subject: regular expression
It's not a secret anymore!