Date: Fri, 12 May 2000 10:39:00 +0200 From: "Dan Larsson" <dl@tyfon.net> To: <questions@freebsd.org> Subject: RE: regexp driving me nuts, help needed! (followup) Message-ID: <NEBBJANJCNNAKCPFKHHFGEHMCCAA.dl@tyfon.net> In-Reply-To: <200005111743.9399@tulip.eng.cam.ac.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks for all the help guys (you know who you are)! Now I can extract 'sub.domain.tld/file.html' to 'domain.tld'. Thanks! However I need to extract and return second level domainname with top level domainname from any combination: https://foo.bar.sub.domain.tld/anythingornothing/file.html gopher://anything.domain.tld/nothingoranything/foo.file anything://domain.tld/file.php3 http://domain.tld/ telnet://domain.tld should all return: 'domain.tld'. Maybe I'm reaching in the wrong direction when trying to use regexps for this. Any other method is also welcome. Regards ------------ Dan Larsson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NEBBJANJCNNAKCPFKHHFGEHMCCAA.dl>