Test, validate and match regular expressions
A basic email validation pattern that matches the common email structure: local-part@domain.tld. It allows alphanumeric characters, hyphens, underscores, and dots in both the local and domain parts, with a top-level domain of 2-4 word characters. Note that this regex has limitations—it allows empty local/domain parts due to the asterisk quantifiers, doesn't support the plus (+) character often used in email aliases, and restricts TLDs to a maximum of 4 characters, which would exclude newer TLDs like .museum or .photography.