Extract email addresses
pattern: \b([\w.+-]+)@([\w-]+\.[\w.-]+)\b flags: gi text: Contact alice@example.com or BOB@test.org. Also: charlie@nope, dave@work.io.
3 matches #1 alice@example.com group1=alice group2=example.com #2 BOB@test.org group1=BOB group2=test.org #3 dave@work.io group1=dave group2=work.io
The g flag returns every match instead of stopping at the first; i makes the match case-insensitive. "charlie@nope" is skipped because there is no dot after the host.