On 14-06-02, 23:41, Robert Klemme wrote:
> That depends on your input. Do you want to find those domain names in
> a larger text? Do you try to parse URIs? Do you have full qualified
> domain names from which you want to extract a portion?

URI can extract from larger texts (URI.extract), parse URIs (URI.parse), 
and after that it's easy to split the domain parts from the 
fully-qualified hostnames. Really, I don't think there's any point in 
reinventing this using a Regexp... unless it's just a learning exercise.

Andrew Vit