I have a long long text contains multiple url. BUT there is only one url which is of blogspot.com . That url will be like http://xxxxx.blogspot.com . How could i get the value of xxxx and store in a variable.
So if I have the whole text store in $foo. Can any one write the code to extract the subdomain out.
I guess it should be of only 1 or 2 line using preg_match . But i'am not getting it to work. Rejex are confusing me.
Thank you