From owner-freebsd-questions Thu May 11 9:41:20 2000 Delivered-To: freebsd-questions@freebsd.org Received: from hq1.tyfon.net (hq1.tyfon.net [213.212.29.17]) by hub.freebsd.org (Postfix) with ESMTP id 6857637B536 for ; Thu, 11 May 2000 09:41:18 -0700 (PDT) (envelope-from dl@tyfon.net) Received: from enigmatic (dan [192.168.1.20]) by hq1.tyfon.net (Postfix) with SMTP id 942511C7B6 for ; Thu, 11 May 2000 18:41:16 +0200 (CEST) From: "Dan Larsson" To: Subject: regexp driving me nuts, help needed! Date: Thu, 11 May 2000 18:42:59 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I need to get the domain and tld from an url. this my idea of what would match and return 'domain.com': echo http://www.domain.com/html.asp | sed -e 's/\([\.a-zA-Z0-9]+[a-zA-Z]{2,3}\)/\1 /g' But that's not what sh thinks ( it returns the whole url ) What regexp should I use to get the desired result? Regards ------------ Dan Larsson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message