Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on Regular expression within the JavaScript forums, part of the Web Development category; Hi guys, My requirement is that a password string be validated in JavaScript : (It should work for both firefox 3.0 and internet explorer 6 and IE7) 1. It must ...
|
|||||||
|
|||
|
Regular expression
Hi guys,
My requirement is that a password string be validated in JavaScript: (It should work for both firefox 3.0 and internet explorer 6 and IE7) 1. It must have ONE UPPERCASE. 2. It must have ONE LOWERCASE. 3. It must have ONE DIGIT. 4. SPECIAL CHARACTER is not mandatory. I am using the regular expression: var re = /(?=\w*[0-9])(?=\w*[a-z])(?=\w*[A-Z])\w*/; Here the problem is that Abcd1@123 works. However Abcd@123 does not work. I think the '@123' is being matched to \w*. Thus the condition of (?=\w*[0-9]) , that a digit is a mandatory is not being satisfied and my password match is failing. Anything after a special character is not being checked. Plz help me to do this.. Thanks in advance Riju |
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regular Expression in QTP | radhika_inala | QTP | 22 | 07-13-2009 09:08 AM |
| Regular Expression | learqtptesting | QTP | 2 | 08-18-2008 03:20 PM |
| regular expression | snigdha_123 | QTP | 1 | 12-17-2007 07:37 AM |
| Regular Expression | gouthami123 | QTP | 3 | 08-17-2007 11:32 AM |
| What is Regular Expression? | JobHelper | Testing Issues | 1 | 12-16-2006 07:17 AM |