Re: back references using regex - Mailing list pgsql-general

From Matthew Peter
Subject Re: back references using regex
Date
Msg-id 20050908194540.40545.qmail@web35212.mail.mud.yahoo.com
Whole thread Raw
In response to Re: back references using regex  (Peter Fein <pfein@pobox.com>)
Responses Re: back references using regex
List pgsql-general
Ya, but I'd have to recompile to get python in. Plus,
I don't want to use Python. I want to use and learn
more pgsql. Keep things clean and lean if possible...
I just got a postgres book yesterday for additional
reading which it only had 2 pages on regex's in the
index :(

--- Peter Fein <pfein@pobox.com> wrote:

> Matthew Peter wrote:
> > That doesn't seem to work with digits
> >
> > SELECT substring('12.00.00.34' FROM
> $$((\d+)\.\2)$$);
> >  or
> > SELECT substring('12.00.00.34' FROM
> $$((\w+)\.\2)$$);
> >
> > but works with strings
> >
> > SELECT substring('abc.foo.foo.xyz' FROM
> > $$((\w+)\.\2)$$);
> >
> > What I basically want to do is have a slice
> function
> > like Python, where I can slice out items from a
> \s, \.
> > or \n\n separated list.
>
> You could always just write it in pl/python...
>
> --
> Peter Fein                 pfein@pobox.com
>       773-575-0694
>
> Basically, if you're not a utopianist, you're a
> schmuck. -J. Feldman
>





______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

pgsql-general by date:

Previous
From: snacktime
Date:
Subject: per user logging
Next
From: Michael Fuhr
Date:
Subject: Re: back references using regex