I'm trying to get TLDs of urls. The Problem is, domains can be multileveled...
Examples
- mydomain.com
- www.mydomain.com
- beta.www.mydomain.com
Result should be: com
and
- mydomain.com.au
- www.mydomain.com.au
- beta.www.mydomain.com.au
Result should be: com.au
Any ideas how to do this without defining all the TLDs I want to work with?