Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id BA8FB9F9775 for ; Wed, 12 Sep 2007 00:47:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 28102-04 for ; Wed, 12 Sep 2007 00:47:01 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from web54303.mail.re2.yahoo.com (web54303.mail.re2.yahoo.com [206.190.49.113]) by postgresql.org (Postfix) with SMTP id D5A879F9767 for ; Wed, 12 Sep 2007 00:47:01 -0300 (ADT) Received: (qmail 63259 invoked by uid 60001); 12 Sep 2007 03:47:01 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=jQyHJ4gQicO54XfmWB//QT/uAQcVQFL2lbq225EbpqiAtaeoZMgskeQuUR19NyWZpo2bcLTu3GWiabhsOq15ie5mBwXZnMB3L5QhNtIW4KdoAlD6ZMcHfdEWPYxYFnRSfRcgEIs24gNtaELZEKu8KR27BfRryDpgOZ1qVpu8g5o=; X-YMail-OSG: xwJ1flgVM1k.tF4TtG9UipBsWEc.HTyIaEX8WaIS3AwNYE9omcT1axyQBHGdw64a918iuUzcnHaWdcaGGpv4PZtMHqfcmPG5LrRikjImkHKCueSyyK8VlTNYysU8M0D7tXjGJIGl_8dJig-- Received: from [69.229.233.47] by web54303.mail.re2.yahoo.com via HTTP; Tue, 11 Sep 2007 20:47:01 PDT Date: Tue, 11 Sep 2007 20:47:01 -0700 (PDT) From: chester c young Subject: Re: Extracting hostname from URI column To: Paul Lambert Cc: sql pgsql In-Reply-To: <46E73D1C.4020009@autoledgers.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <139773.62590.qm@web54303.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/94 X-Sequence-Number: 29307 > >> I'm trying to use substr() and position() functions to extract the > >> full host name (and later a domain) from a column that holds URLs. > > > > substring( href from '.*://\([^/]*)' ); > > typo: no backslash in front of left paren substring( href from '.*://([^/]*)' ) match up thru // within parens, match anything except / return match within parens ____________________________________________________________________________________ Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online. http://smallbusiness.yahoo.com/webhosting