Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5E5329F96F8 for ; Tue, 11 Sep 2007 23:39:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40891-08 for ; Tue, 11 Sep 2007 23:39:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from rrmailscan3.safenetbox.biz (mailscan3.reynolds.com.au [203.25.40.75]) by postgresql.org (Postfix) with ESMTP id 7BABD9F9608 for ; Tue, 11 Sep 2007 23:39:07 -0300 (ADT) Received: from rrmailscan3.safenetbox.biz (rrmailscan3.safenetbox.biz [127.0.0.1]) by rrmailscan3.safenetbox.biz (Postfix) with ESMTP id 7789D1D4847F for ; Wed, 12 Sep 2007 12:39:05 +1000 (EST) Received: from [127.0.0.1] (online4-new.lnk.telstra.net [139.130.169.227]) (Authenticated sender: remote) by rrmailscan3.safenetbox.biz (Postfix) with ESMTP id C694E1D48454 for ; Wed, 12 Sep 2007 12:39:03 +1000 (EST) Message-ID: <46E7510C.1090807@autoledgers.com.au> Date: Wed, 12 Sep 2007 10:38:04 +0800 From: Paul Lambert User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: sql pgsql Subject: Re: Extracting hostname from URI column References: <335491.75226.qm@web54303.mail.re2.yahoo.com> <46E73D1C.4020009@autoledgers.com.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/92 X-Sequence-Number: 29305 Andrej Ricnik-Bay wrote: > 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 > > Thanks - that makes a bit more sense. I'm in the middle of reading chapter 9.3.7 of the manual - POSIX Regular Expressions - which I'm assuming is dealing with this, so it's looking clearer. -- Paul Lambert Database Administrator AutoLedgers