Test, validate and match regular expressions
Matches simple email addresses line-by-line in multiline text, capturing the local part, @ symbol, domain name, dot, and a TLD of 3-4 word characters (e.g., .com, .net, .info). The ^ and $ anchors with the m flag validate each line independently, while the g flag finds all matches. It's a basic pattern that misses valid formats like subdomains, hyphens, plus-addressing, and longer modern TLDs.