Test, validate and match regular expressions
This comprehensive regex validates email addresses by checking for proper format with a local part, @ symbol, and domain. It implements security-focused restrictions by disallowing angle brackets, square brackets, and certain special characters in both local and domain parts, while still supporting standard email formats including quoted strings in the local part. The pattern requires at least a two-character top-level domain and works across multiple lines with the gm flags.