I have a bunch of domain names coming in like this:
http://subdomain.example.com (example.com is always example.com, but the subdomain varies).
I need \"subd
To math sub domains with dot character in it, I used this one
https?:\/\/?(?:([^*]+)\.)?domain\.com
to get all matching characters after protocol until domain.
https://sub.domain.com (sub)
https://sub.sub.domain.com (sub.sub) ...