re: Daily Challenge #89 - Extract domain name from URL VIEW POST

re: Haskell Note: Assuming the string will always start with either http:// or https:// or nothing but not supporting any other protocols (by lazyness...

Have you tried it using a TLD? :D


No I didn't and I assume it will fail for this particular case. Do you have any way on improving this one?

Unfortunately, I think the only way to improve on it is to use the list of all TLDs to find how much of the end of the domain is TLD.

code of conduct - report abuse