I am currently trying to extract all e-mail addresses from a string / variable, but cannot figure out how to save more than one. The regex below does find the first e-mail address in the string, but then stops. I tried some variations with repeat-actions but cannot get to other capture groups..
You're on the right track. Try this, using the KM For Each action (KM Wiki). Below is an example of how this can be done in general. You will need to replace data in these Actions with YOUR data:
Set Local__SourceStr
The RegEx in the subscrings block of the For Each
Example Results
###MACRO:@RegEx Extract Multiple Matches into Results List @Example
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.
I have tried changing variables in your script so it wil extract email and then remove mailto links ones could you let me know what I would have to do to get this variable to work