I'm looking for help in isolating the TLD (top level domain) from /whois data. I already have part of the script but I lack the part to get just the TLD from the whois data. Could someone please help me with this?

I can't just use a script to just take the last three letters because people from many different places and around the world visit my channel. So, sometimes it's a two letter country code, sometimes it's three letters, sometimes four, etc.. So, I just want the very last letters after the last dot.

In case an example is needed, this is what I want:

JohnSMith is jsmith@blahblah.blahblah.com
or
JohnSMith is jsmith@blahblah.blahblah.ac

I just want the .com or .ac but without the "." dot.


Lloyd