Search Postgresql Archives

Re: back references using regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx                 773-575-0694

Basically, if you're not a utopianist, you're a schmuck. -J. Feldman

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux