Test, validate and match regular expressions
Validates passwords between 8 and 20 characters long that must contain at least one letter, at least one digit, and at least one special character from the set #?!@$%^&*-. A negative lookahead with a backreference also rejects strings containing consecutive repeated characters (e.g., 'aa', '11', '##'). With the gm flags it can validate multiple candidate passwords line by line, making it useful for registration forms and password policy enforcement.