Test, validate and match regular expressions
Validates passwords that are 8 to 16 characters long and must contain at least one lowercase letter, one uppercase letter, one digit, and one special character from @, *, $, or #. It uses four positive lookaheads to enforce the character class requirements before matching the actual 8-16 character string. Commonly used in user registration forms and credential policy enforcement; the global and multiline flags allow validating multiple password candidates line by line.