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
Purely the subdomain string (result is $1):
^http://([^.]+)\.domain\.com
Making http:// optional (result is $2):
http://
^(http://)?([^.]+)\.domain\.com
Making the http:// and the subdomain optional (result is $3):
(http://)?(([^.]+)\.)?domain\.com