Test, validate and match regular expressions
This regex performs basic email validation by matching a simple email format with a username, domain, and one or two TLD segments. It captures the username (word characters only), domain name, and TLD components, allowing for patterns like 'user@domain.com' or 'user@domain.co.uk'. This pattern is limited as it doesn't support special characters commonly found in emails like dots, plus signs, or hyphens in the local part, nor does it handle subdomains.