Test, validate and match regular expressions
This regex uses two positive lookaheads to ensure that a string contains at least one digit ([0-9]) and at least one letter ([a-zA-Z]), in any order, then matches the entire string with .*. It is commonly used for validating passwords or inputs that require both alphanumeric types, while allowing any other characters. The global and multiline flags allow it to apply to each line independently.