How do I get links in emails in a new safari window with tabs?

There is an forum post in which the tabs of the Safari front window are copied to the clipboard. [Copy Safari Front Window URLs]
Is it possible to do this in reverse? I often get emails with links that I've clicked individually so far. I want to mark the links and copy them manually to the clipboard and the macro opens a new window in Safari with all the tabs. Or is there a better solution? Can somebody help me? Unfortunately I cannot program.
Mostly the emails look like this:

From time to time there is also a blank line in between.

Hi @Tomaso71,

This example macro should open every URL in the currently selected text in separate tabs in a new Safari window, whether that text is in an email or not, and regardless of how many lines are blank. You can select just the text that contains the URLs or hit A to select the entire body of text before running the macro; either way, it should work fine.

Open All Links in Selected Text.kmmacros (4.5 KB)

Give this a try and feel free to report back with any questions if you have them.

Note: Regex to match URLs taken from


It just works!!! Thank you very much!!! Since this was my first post, I unfortunately don't know how to get the case closed.

Glad to hear it worked for you. No need to worry about closing this thread; marking the post that solved your problem as the solution was all you needed to do :slightly_smiling_face: