From: | "Andrej Ricnik-Bay" <andrej(dot)groups(at)gmail(dot)com> |
---|---|
To: | "Paul Lambert" <paul(dot)lambert(at)autoledgers(dot)com(dot)au> |
Cc: | "sql pgsql" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Extracting hostname from URI column |
Date: | 2007-09-12 02:19:12 |
Message-ID: | b35603930709111919y475cd202gfc70d52a2db508dc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 9/12/07, Paul Lambert <paul(dot)lambert(at)autoledgers(dot)com(dot)au> 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Lambert | 2007-09-12 02:38:04 | Re: Extracting hostname from URI column |
Previous Message | Paul Lambert | 2007-09-12 01:13:00 | Re: Extracting hostname from URI column |