Test, validate and match regular expressions
Validates passwords of 8-16 characters that must contain at least one digit, one uppercase letter, and one special character (non-word), while rejecting any whitespace. It uses positive lookaheads to enforce character class requirements and a negative lookahead to prohibit spaces, with the multiline flag anchoring ^ at line starts. Typically used for enforcing password strength rules in web form validation. The leading ([a-z]*) capture group also matches any run of lowercase letters.