May 2016 20
How to extract domain from URL
Posted By : Alexander Goida

You want to extract a domain from URL. The list of URLs to support might be as below. For this list you expect the domain [crayon-5f744be544957965000735-i/] : sub.domain.com/folder?p1=v1 www.sub.domain.com/folder?p1=v1 http://sub.domain.com/folder?p1=v1 https://sub.domain.com/folder?p1=v1 https://www.sub.domain.com/folder?p1=v1 For this list you expect