wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "regular expression" Watch "regular expression" New topic
Author

regular expression

Bushra Binte
Ranch Hand

Joined: Nov 07, 2006
Posts: 60
Hi,
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 (@,$,%,&)

thanks
shivendra tripathi
Ranch Hand

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


SCJP 1.5(97%) My Blog
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18498
    
  40


try...



Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
 
subject: regular expression
 
Similar Threads
REgular Expression for string validation
Validation Using Regular Expression in Javascript
Regular Expression
questions regarding regular expressions
Regular Expression