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

From Peter Fein
Subject Re: back references using regex
Date
Msg-id 43208BE4.3060605@pobox.com
Whole thread Raw
In response to Re: back references using regex  (Matthew Peter <survivedsushi@yahoo.com>)
Responses Re: back references using regex
List pgsql-general
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

pgsql-general by date:

Previous
From: "Cristian Prieto"
Date:
Subject: Re: Email Verfication Regular Expression
Next
From: "Michael Schmidt"
Date:
Subject: Re: EMS PostgreSQL Manager vs. TheKompany DataArchitect