How to validate password with regular expression,PHP

Today’s post is about password validation in PHP using Regular Expressions.

Here is the small use full Password Validation function.

Password Regular Expression Pattern

$S*(?=S{8,})(?=S*[a-z])(?=S*[A-Z])(?=S*[d])(?=S*[W])S*$

Regular Expression Pattern Description

The whole combination means, at list 8 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.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status