Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0AF3E9FA37E for ; Tue, 11 Sep 2007 23:19:19 -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 86700-01 for ; Tue, 11 Sep 2007 23:19:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) by postgresql.org (Postfix) with ESMTP id 6ABCB9FA316 for ; Tue, 11 Sep 2007 23:19:14 -0300 (ADT) Received: by rv-out-0910.google.com with SMTP id l15so45316rvb for ; Tue, 11 Sep 2007 19:19:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=5k3L082VZU9PjbUQ1KDVaykL8ZO89Ibrp1EZxC6Bodg=; b=Nzb3uBJDtbB15acyb3PZ1MsoetgxWE++/oQ8JYGrGJuHcpNAFZLmkycUC8wl2uzod1DnS+QrVFnBrWGao62tEJRQ6Pwl3CWRSdM6huNoLOoozXRNjt69cBMVx192XVcsnKyRKisWkbvHxFUwt8voRM81j94LrckrmweOkkZDMU4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TXcCp8aLa0l0MXH0sGonRpqT1YEqE09M394gU6N1iXKveW4dY3TTxLGSe0ujCVZ/rjxiE+Px0TwMpolgUtu+wn3u0eWwtpdnNdRzgkcHGjai66hipm9jhWPyqZKau0R8kiuyOBQTM9KDc93Ws11ahrj3ULoHQdbs7mxL4xbc2oI= Received: by 10.141.20.7 with SMTP id x7mr1124698rvi.1189563552629; Tue, 11 Sep 2007 19:19:12 -0700 (PDT) Received: by 10.141.196.21 with HTTP; Tue, 11 Sep 2007 19:19:12 -0700 (PDT) Message-ID: Date: Wed, 12 Sep 2007 14:19:12 +1200 From: "Andrej Ricnik-Bay" To: "Paul Lambert" Subject: Re: Extracting hostname from URI column 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: 7bit Content-Disposition: inline References: <335491.75226.qm@web54303.mail.re2.yahoo.com> <46E73D1C.4020009@autoledgers.com.au> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/91 X-Sequence-Number: 29304 On 9/12/07, Paul Lambert wrote: > > substring( href from '.*://\([^/]*)' ); > Ok, your solution looks better than mine... but I have no idea how to > interpret that, time to consult some manuals. Plain regex.... The key are the parenthesis () ... basically it will omit ANYTHING + two slashes at the beginning of a string. Then it will match everything BUT a slash, and as much of that as possible since regex are greedy by default (hence the host name he was looking for) ... and everything AFTER a slash will be omitted. Cheers, Andrej -- Please don't top post, and don't use HTML e-Mail :} Make your quotes concise. http://www.american.edu/econ/notes/htmlmail.htm