How to find all e-mail addresses in string/variable via regex?

Hey Marc,

I repurposed my Perl script from the “Find Email Address?” topic to operate on text in any given Keyboard Maestro variable.

The email address RegEx pattern is by Jan Goyvaerts who's been a big name in the RegEx community for many years.

To use the script all you have to do is change the value of the $kmVarName variable in the script to exactly match the name of the Keyboard Maestro variable you want to search.

Currently the output is to a Keyboard Maestro window, but you can change that as needed.

-Chris


Extract Email Addresses from Source Text.kmmacros (7.3 KB)