Find all emails in messy text; print unique (lowercase) sorted alphabetically.
Stdin is a body of free-form text on multiple lines. Extract every email address with a regex, lowercase them, deduplicate, then print sorted ascending.
Test input:
Contact us at Hello@Foo.com or sales@foo.com
for support: hello@foo.com, billing@bar.org
Expected output:
billing@bar.org
hello@foo.com
sales@foo.com
Sign in to save your code and track progress across devices.