regular expression for strong password in php

Solutions on MaxInterview for regular expression for strong password in php by the best coders in the world

showing results for - "regular expression for strong password in php"
Ewan
21 Jan 2016
1if(preg_match((?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$, $_POST['password']):
2
3echo 'matched';
4
5else:
6
7echo 'not matched';
8
9endif;
10
Nick
21 Jan 2018
1^(?=\P{Ll}*\p{Ll})(?=\P{Lu}*\p{Lu})(?=\P{N}*\p{N})(?=[\p{L}\p{N}]*[^\p{L}\p{N}])[\s\S]{8,}$
2