Test, validate and match regular expressions
Validates email addresses for practice purposes. The local part allows word characters separated by hyphens, dots, or underscores, followed by an @ symbol, a domain name with optional hyphenated segments, a 2-3 character TLD, and an optional second-level suffix like .co.uk. Commonly used for basic form input validation, though it misses some valid emails (e.g., + addressing or longer TLDs like .info). The gim flags enable global, case-insensitive, multiline matching.