in reply to regex to extract fully-qualified domain name from full URL

Couldn't you do something along the lines of
(\.\w\w\w?)+
to make it match any set of two or three word characters beginning with a dot? I would think this solution would take care of most of the problems, though it is an ugly hack.