Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ regular expression to match a pattern
|
regular expression to match a pattern
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Rajeev
(1 post) Bio
|
| Date
| Wed 11 Dec 2002 12:13 PM (UTC) |
| Message
| I want to write a regular expresssion that matches a string containing atlease one small case letter, one upper case letter, one digit and must be atleast be atleast 8 character long.
can someone help me writing such expression ?
thanks
Rajeev | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Thu 12 Dec 2002 05:21 AM (UTC) |
| Message
| I presume you mean, in any order, and that the other 5 characters are from the same group? I don't think you can do that in one regular expression, but you could go a fair way, and test the resulting string in a script. Something like this:
([A-Za-z0-9]{8,})
Then in a script use "instr" to confirm that you got one from each group you mention. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,523 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top