What is the best way to fully pull the top level domain out of a URL?
I need to check the top level domain to show a message if it is this or that.
so if I have a url:
http://www.net.domain.com/Pages/Pages/gov/test.html
So say if the domain ends in .com or .net I need to show this message. Well the sub domain contains .net, so I need a regex or a proper way to find domain.com and test only that etc.
Go to the complete details ...