Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E038C9F9AEA for ; Tue, 11 Sep 2007 21:42:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 50811-01 for ; Tue, 11 Sep 2007 21:42:47 -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 E98909F9A80 for ; Tue, 11 Sep 2007 21:42:47 -0300 (ADT) Received: (qmail 76383 invoked by uid 60001); 12 Sep 2007 00:42:46 -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=VpiTiEpXYxiG8D1hYlpJ6xpwOElpkFO8zkOGuqzLEqF6jwRHemv/+4zAg+wNP5HNkkBBCsOr1WN/+H87JA3aatxml9QnV6BU+Wr4N6I+Pa6IoVbFEm9cM3tfSx7aS/xw/OqohKI3WIQjX0vLa95khcTqo5aWFYByNJCv4l98dPs=; X-YMail-OSG: IL.M2vQVM1mq65p8dZqWwV3Hu5iPje67P08kKxBpoJSENBrBKhE5MIpBX6c933zGng-- Received: from [69.229.233.47] by web54303.mail.re2.yahoo.com via HTTP; Tue, 11 Sep 2007 17:42:46 PDT Date: Tue, 11 Sep 2007 17:42:46 -0700 (PDT) From: chester c young Subject: Re: Extracting hostname from URI column To: ogjunk-pgjedan@yahoo.com Cc: sql pgsql In-Reply-To: <335284.57764.qm@web50301.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <335491.75226.qm@web54303.mail.re2.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/87 X-Sequence-Number: 29300 > 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 '.*://\([^/]*)' ); ____________________________________________________________________________________ Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/