Search Postgresql Archives

Re: Emulating flexible regex replace

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

 



This yields a successful match since $1 in the /target pattern/ is replaced 
> by "123" from the first captured group in *source* and the resulting
> string, 
> "123 target text", matches the /target pattern/. 

> I would like to execute a query which for a given /source pattern/ and 
> /target pattern/ returns all rows from the *SEGMENT* table where *source* 
> matches the /source pattern/ and *target* matches the /target pattern/
> after 
> it has its references replaced with the actual captured groups. 

> I believe this is not possible since *regexp_replace* expects a string as 
> its /replacement/ argument which is not enough in this case. 



-----
GuL
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Emulating-flexible-regex-replace-tp5824034p5824107.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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