I have following JavaScript code with regular expression which is working as expected.
var re = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[\w~@#$%^&*+=`|<>'{}:;,!.?/\\"()\[\]-]{10,99}$/;
return re.test(value);
When I tried to convert this to PHP I am getting the following error.
Warning: preg_match(): Unknown modifier '&'
I have tried following PHP code
$pass = 'avbbc';
if(!preg_match( '^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[\w~@#$%^&*+=`|<>\'{}:;,!.?\\"()\[\]-]{10,99}$', $pass )){
echo "error";
}else{
echo "success";
}