• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regular expression

 
Bushra Binte
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try [a-zA-Z0-9@$%&]
 
Henry Wong
author
Marshal
Pie
Posts: 21490
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

try...



Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic