DEV Community

loading...

Discussion on: Daily Challenge #89 - Extract domain name from URL

Collapse
erezwanderman profile image
erezwanderman

Actually the domain name is the whole thing - "twitter.com", "github.com", "youtube.com". What do you want to get for something like "a.b.c.ac.il"?

Collapse
eyemyth profile image
Jay Thompson

Even "com" or whatever other TLD is a domain name. The most specific domain name in "www dot youtube dot com" is "www".

(edited because def dot to removed the www from my youtube URL.)