Jump to content

Regular Expression


shah_ankitb
 Share

Recommended Posts

Thanks for reply, but still i'm looking for more.Minimum 7 CharactersIt' not working properly for "asdas111111"it should contian 1 number & 1 aplhanumeric characters among minimum 7 characters.I think i got it/^(?=.{7,}$)(?=.*[0-9])(?=.*[a-zA-Z]).*$/

Edited by Ankit Shah
Link to comment
Share on other sites

aren't alpha numeric sets a combination of letters (A-Z) and numbers (0-9)?are you trying to force them to input a special character? i.e. @, $, #, etc?

Link to comment
Share on other sites

aren't alpha numeric sets a combination of letters (A-Z) and numbers (0-9)?are you trying to force them to input a special character? i.e. @, $, #, etc?
No i'm not forcing them to enter special characters, but if they want to enter then they can
Link to comment
Share on other sites

Sorry, I was confused by this

it should contian 1 number & 1 aplhanumeric characters among minimum 7 characters.
not sure myself. I was thinking that since a number was part of the alphanumeric set, that putting a number might count for two characters out of the 7; or that putting a number might count as 1 out of 7.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...