I have a string in TypeScript which is subdomain.domain.com
I want to create a new string that is just the domain on its own, so for example subdomain.domain.com
would become domain.com
Note: The 'subdomain' part of the URL could be different sizes so it could be 'subdomain.domain.com' or it might be 'sub.domain.com' so I can't do this on character size. The domain might also be different so it could be 'subdomain.domain.com' or it could be 'subdomain.new-domain.com'.
So basically I need to just remove up to and including the first '.' - hope that all makes sense.