Can someone give me a regex to match a URL? www.domain.extension? I want www, the domain, and the extension. m/(www)\.({a-zA-Z})\.(...)/ was the best I could come up with. The a-zA-Z surely isn't good enough because domains can use - and other characters. Any help would be appreciated.