I need to get domain name from URL excluding "www" and ".com" or ".co.uk" or anything other.
Example-
I have following urls like-
http://www.example.com
http://www.example.co.uk
http://subdomain.example.com
http://subdomain.example.co.uk
There will be anything at ".com" , ".org" , ".co.in", ".co.uk".