Search Postgresql Archives

Re: back references using regex

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

 



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@xxxxxxxxx> 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@xxxxxxxxx          
>       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/

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[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