@AkshayHallur, since @Tom stepped out with a full solution, he inspired me to work on the RegEx.
I found a two-step solution that should work with ANY TDL, and any Server (like “www” or “test”, or none).
First RegEx to Extract Server Name:
(I started with @Tom’s RegEx)
Second RegEx to Extract Domain Name from Server Name:
Given this URL:
Here’s the macro:
###MACRO: @RegEx Extract Domain Name [Example]
~~~ VER: 1.0 2017-09-08 ~~~
@RegEx Extract Domain Name [Example].kmmacros (3.3 KB)
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.