File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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: 20374



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