Re: Extracting hostname from URI column - Mailing list pgsql-sql

From chester c young
Subject Re: Extracting hostname from URI column
Date
Msg-id 139773.62590.qm@web54303.mail.re2.yahoo.com
Whole thread Raw
In response to Re: Extracting hostname from URI column  (Paul Lambert <paul.lambert@autoledgers.com.au>)
List pgsql-sql
> >> 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 


pgsql-sql by date:

Previous
From: ogjunk-pgjedan@yahoo.com
Date:
Subject: Re: Extracting hostname from URI column
Next
From: Paul Lambert
Date:
Subject: Re: Extracting hostname from URI column