Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Checking password for upper and lower case letter

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,36882
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Checking password for upper and lower case letter
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Checking password for upper and lower case letter - 8/9/2006 2:12:09 PM   
  jutang

 

Posts: 4
Score: 0
Joined: 4/27/2006
From: Perth, Australia
Status: offline
Hi all,

I can't find the solution to checking a password to see if the user has entered a password with at least one uppercase, one lowercase letter and one number.
This piece of code I am playing with is to check for the upper case letter.  Can anyone help me please?
regards Mandy
dim pass
dim pass2
pass=times.pass.value
pass2=times.pass.value

if instr(1,Ucase(times.pass.value),([0-9A-z]{1})) = 1 then  
Alert "Password is a success"
times.pass.value=""
times.pass.focus
exit sub
else Alert""password is wrong"
exit sub
end if
end sub
 
 
Post #: 1
 
 RE: Checking password for upper and lower case letter - 8/9/2006 5:26:00 PM   
  ginolard


Posts: 1051
Score: 21
Joined: 8/10/2005
Status: offline
Take a look at Regular Expressions.  Do a seach on these forums for loads of posts on it.

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to jutang)
 
 
Post #: 2
 
 RE: Checking password for upper and lower case letter - 8/9/2006 6:17:34 PM   
  ehvbs

 

Posts: 2172
Score: 50
Joined: 6/22/2005
From: Germany
Status: online
Hi jutang,

I hope this helps:


      

output:


      

(in reply to ginolard)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Checking password for upper and lower case letter Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts