Re: back references using regex

From: Matthew Peter <survivedsushi(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: back references using regex
Date: 2005-09-08 19:45:40
Message-ID: 20050908194540.40545.qmail@web35212.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)pobox(dot)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(at)pobox(dot)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/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-09-08 19:58:16 Re: back references using regex
Previous Message snacktime 2005-09-08 19:37:24 per user logging