i need to retrieve an top level domain from the url means ex
http://www.google.com
this can be attained by
url.getHost();
but the thing is in case i have some sub domain with url
it extracts example.google.com i need to extract the google.com alone is there is any way to extract it...
example.google.comandgoogle.comiscom.google.comis second level domain. The most righteous.-part is always the top-level, followed by second-level and so on.google.co.uk