Articles
Windows FAQ
Making your network more secure - Use a firewall - Windows Vista...
Making your network more secure - Run antivirus software on each...
User accounts FAQ - An unidentified program wants access to your...
Making your network more secure - General network security recom...
What is User Account Control? - Windows Vista Security - User ac...
Who's Online
18 user(s) are online (3 user(s) are browsing Forum)

Members: 0
Guests: 18

more...

Browsing this Thread:   1 Anonymous Users





How to validate password with regular expression
Just can't stay away
Joined:
2007/11/1 12:10
Group:
Registered Users
Posts: 103
Level : 9; EXP : 15
HP : 0 / 203
MP : 34 / 1233
Offline
How to validate password with regular expression

((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{6,20})


Description

* ?= – means apply the assertion formula, meaningless by itself, always work with other combination.
* . – means any characters except new line “\n”
* * – means length can be zero or more
* () – grouping
* (?=.*\d) – \d means digit from 0-9. Only digit is allow here.
* (?=.*[a-z]) – [a-z] means lowercase characters from a to z. Only lowercase characters is allow here.
* (?=.*[A-Z]) – [A-Z] means uppercase characters from A to Z. Only uppercase characters is allow here.
* (?=.*[@#$%]) – [@#$%] means special character “@#$%”. Only special characters “@#$%” is allow here.
* {6,20} – the length of the string, minimum characters is 6, maximum characters is 20.

Whole combination is means, 6 to 20 characters string with at least one digit, one upper case letter, one lower case letter and one special symbol (”@#$%”). This regular expression pattern is very useful to implement a strong and complex password.

P.S The grouping formula order is doesn’t matter.

Posted on: 10/26 15:00
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Copyright © 2009 FYIcenter.com
Search
Main Menu
Login
Username:

Password:


Lost Password?

Register now!