Extract domain names from a list of web site urls

  • Thread starter Thread starter johnjohn11
  • Start date Start date
J

johnjohn11

Guest
I am working on an asp.net console application. and the console application reads the websites from an external service. but the websites comes with different formats,,, these are samples of the formats:-

http://www.****.co.uk/
http://www.****.com/global/index.htm
https://www.****.com/
https://****.com/
www.***.net
*******.com
now i need to only extract the domain name from the above urls (i do not need to include http or https or wwww , etc..). so i am not sure which is the best appraoch to do so? i need this as i am using a .netlibrary named https://www.nuget.org/packages/ARSoft.Tools.Net which allow me to get the email hosting company from the website domain name.. but if i apply the above urls i will get errors except for the last url which only include the domain name which i am looking to extract...
so can anyone advice on this please?

Thanks

Continue reading...
 
Back
Top