Test, validate and match regular expressions
Validates passwords in JavaScript by using positive lookaheads anchored at the start to require at least one uppercase letter, one lowercase letter, and one digit, each appearing before any whitespace. The main body .{6,} combined with a trailing \S enforces a minimum length of 7 characters and ensures the final character is not whitespace. Typically used in signup and password-change forms to enforce basic password strength rules.