I want to remove duplicate domains in a large list of URLs in c#,
For example if the list was:
https://example.com/example.php/login/
https://2example2.com/example/
https://example.com/register.php/
https://example.com/info/
https://example.com/example.php/login/
https://2example2.com/register/
I need to remove all of the duplicate domains except the first one
so this would be the end result:
https://example.com/example.php/login/
https://2example2.com/example/
Can anyone help me? I know how to separate the domain from the rest of the URL but I'm not sure how to keep the first one.