How to trim URL to root domain?

Well, this is a three year old thread, but since this topic was so extensively, exhaustively, discussed, I thought I'd post a link to my latest solution, for all to review, test, and comment on.

And, to @peternlewis' point, it is an all native KM solution, with no scripting.

MACRO: Extract Domain from URL [Example]