"range out of order in character class" in PHP regex?
The -
needs to be escaped, or placed at the start / end of the [...]
list:
$result = preg_match('/^(?=.*\d)(?=.*[-_+=*&]).{3,}$/',$pass);
If you don't, -
is interpreted as the range operator and if x > y
in [x-y]
you get that error.