Good analysis and test case! Yes, it opens 4 instead of 3 URLs.
The problem was a trailing "/" in one entry, which made code to believe they are not the same. I fixed that and have also made some other changes, find attached new version.
Until new feature to store HTML instead of plain text (that you have requested in other post) is available, there is no point to execute this macro against historical entries - use first version of the macro to open only plain text URLs if you need. This macro has full strength only if you execute it against content in your system clipboard.
With this consideration in mind, I have slightly redesigned the macro. Now you don't need to copy to clipboard selected content, the macro will do it for you. This way you save yourself trouble of remembering to copy before running the macro.
Intended usage:
1) Select some content in web browser;
Do
not press Ctrl+C, nor copy to clipboard any other way. Macro will do it for you automatically.
2) Press designated hot key for the macro.
Result: new browser window opens with multiple tabs for each hyperlink in your selected fragment. See attached diagram for illustration
This is a convenient and streamlined way to open many hyperlinks, instead of clicking on each one individually.
If you want to explicitly copy content to clipboard before running the macro (as it was before), remove 2 lines in the code which I have marked.
Please test new macro. Your idea for this kind of macro was very good! Now saves me a lot of clicks