regular expression to match a pattern

Posted by Rajeev on Wed 11 Dec 2002 12:13 PM — 2 posts, 11,013 views.

#0
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
Australia Forum Administrator #1
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.