I need a suggestion on how could I retrieve the domain from the following :
-
*.yahoo.co.uk
-
*.yahoo.com
so, in both cases, my method must return yahoo.co.uk and yahoo.com.
Is there an easy way to do this, or I just have to struggle with strings and counting characters from the “.” and stuff like that?
Thank you in advance.
Regards,
Andrei
You can use TrimStart if you are lokking for stripping just the ‘.’ and ‘*’ characters: