You get the error because there is no match. Your pattern is incorrect since it matches a single /, while there are 2 /s after http:. You need to fix the pattern as heemayl suggests or use an alternative urlparse based solution to get the netloc part, and get the part in between the first and last dots (either with find and rfind, or regex):
import urlparse, re
path = urlparse.urlparse("http://www.bloomberg.com")
print(path.netloc[path.netloc.find(".")+1:path.netloc.rfind(".")]) # => bloomberg
# or a regex:
print(re.sub(r"\A[^.]*\.(.*)\.[^.]*\Z", r"\1", path.netloc)) # => bloomberg
# or Regex 2:
mObj = re.search(r"\.(.*)\.", path.netloc);
if mObj:
print(mObj.group(1)) # => bloomberg
See Python demo
Regex 1 - \A[^.]*\.(.*)\.[^.]*\Z - will will match the start of string (\A), then 0+ non-.s ([^.]*), then a dot (\.), then will capture any 0+ chars other than a newline into Group 1, then will match . and 0+ non-.s up to the very end of the string (\Z).
Regex 2 will just match the first . followed with any 0+ chars up to the last . capturing what is in between .s into Group 1.