Test, validate and match regular expressions
Validates passwords requiring a minimum length of 8 characters plus at least one lowercase letter, one uppercase letter, one digit, and one special character (from a set including !, @, #, $, and currency symbols like £ and €). Lookaheads ensure each requirement is met anywhere in the string, and the gm flags allow per-line validation of multiline input, such as checking a list of passwords. Note the pattern also expects a trailing space after the validated segment.