Test, validate and match regular expressions
This regex matches email addresses with either two-part (example.com) or three-part (sub.example.com) domains. It validates local parts with alphanumeric characters, hyphens, underscores, and dots, followed by an @ symbol and domain components. It's commonly used for email extraction or validation in forms and text processing applications.