in reply to Password Regex extended

Note that $% is a special variable and is interpolated in the  [@#$%^&+=] regex character set. Escape it with a  \ (backslash) instead.
>perl -wMstrict -le "my $cs1 = qr{ [ab$%cd] }xms; print $cs1; my $cs2 = qr{ [ab\$%cd] }xms; print $cs2; " (?msx-i: [ab0cd] ) (?msx-i: [ab\$%cd] )