Test, validate and match regular expressions
Matches simple email addresses made of word characters and dots before the @ symbol, followed by a domain portion and a final TLD segment (e.g., john.doe@example.com). The global flag finds all occurrences in the input, making it useful for extracting emails from text, logs, or documents. Note it's a loose pattern that won't handle edge cases like plus addressing or hyphens in domains.