Extract domain names out of URLs
- From: MikeB <MPBrede@xxxxxxxxx>
- Date: Sun, 20 Apr 2008 10:17:08 -0700 (PDT)
Hi, I have a list of URLs and I would like to find a way to extract
the domain name from the URL.
The URLs can be prefixed with www in some cases and I'd also like to
strip that off.
So, for the following URLs
http://www.wiseclerk.com/group-news/tag/libor
http://www.wiseclerk.com/group-news/2008/04/
http://www.wiseclerk.com/group-news/
http://www.tiscali.co.uk/search/results.php?section=&from=&query=setana
sports
http://www.techdirt.com/articles/20080408/223932792.shtml
http://www.techdirt.com/articles/20080408/223932792.shtml
http://www.techdirt.com/
http://www.techdirt.com/
http://techdirt.com/index.php
http://techdirt.com/blog.php?tag=loans
I'd like to extract
wiseclerk.com
tiscali.co.uk
techdirt.com
I'm struggling to find the correct algorithm to locate the starting
point (after the http:// or after the http://www.) and the ending
point (the first /) for my Mid function.
Any help appreciated.
I'm thinking that I might have to do a find/search function for either
of the two starting strings and then have the "max" value (for the
longer of the two strings) but that's a lot of extra columns in my
spread***.
Is there perhaps a better way to do this?
.
- Follow-Ups:
- Re: Extract domain names out of URLs
- From: Howard Kaikow
- Re: Extract domain names out of URLs
- From: Ron Rosenfeld
- Re: Extract domain names out of URLs
- From: Ron Rosenfeld
- Re: Extract domain names out of URLs
- From: Ron Rosenfeld
- Re: Extract domain names out of URLs
- From: Nick Hodge
- Re: Extract domain names out of URLs
- From: Rick Rothstein \(MVP - VB\)
- Re: Extract domain names out of URLs
- Prev by Date: Re: Conditional formatting - linked workbooks
- Next by Date: a very minor annoyance . . .
- Previous by thread: How to duplicate a chart that relies on dynamic named ranges
- Next by thread: Re: Extract domain names out of URLs
- Index(es):