Re: [ADMIN] regexp_replace grief

2013-04-12 Thread Alvaro Herrera
Armin Resch escribió: > Thx, Albe. I tested both proposals, and I gravitate now more towards the > E'' nomenclature since it avoids something like this: > > $pg_bs_char = ( $dbh->{pg_server_version} >= 90100 ) ? "\\" : ""; > > Hoping for a long half life of the E'' nomenclature ... E'' is ve

Re: [ADMIN] regexp_replace grief

2013-04-12 Thread Armin Resch
Thx, Albe. I tested both proposals, and I gravitate now more towards the E'' nomenclature since it avoids something like this: $pg_bs_char = ( $dbh->{pg_server_version} >= 90100 ) ? "\\" : ""; Hoping for a long half life of the E'' nomenclature ... -ar On Fri, Apr 12, 2013 at 5:16 AM, Albe

Re: [ADMIN] regexp_replace grief

2013-04-12 Thread Albe Laurenz
Armin Resch wrote: > Not sure this is the right list to vent about this but here you go: > > I) select regexp_replace('BEFORE.AFTER','(.*)\..*','\1','g') "Substring" > II) select regexp_replace('BEFORE.AFTER','(.*)\\..*','\\1','g') "Substring" > > Executing (II) against pg 8.4.4 or 9.0.4 yields '

Re: [ADMIN] regexp_replace grief

2013-04-10 Thread Armin Resch
Thx for clarification, Craig. Your Perl snippet comes in handy, too. -ar On Apr 10, 2013, at 8:08 PM, Craig James wrote: > On Wed, Apr 10, 2013 at 4:59 PM, Armin Resch wrote: >> Not sure this is the right list to vent about this but here you go: >> >> I) select regexp_replace('BEFORE.AFTER','(

Re: [ADMIN] regexp_replace grief

2013-04-10 Thread Craig James
On Wed, Apr 10, 2013 at 4:59 PM, Armin Resch wrote: > Not sure this is the right list to vent about this but here you go: > > I) select regexp_replace('BEFORE.AFTER','(.*)\..*','\1','g') "Substring" > II) select regexp_replace('BEFORE.AFTER','(.*)\\..*','\\1','g') "Substring" > > Executing (II) a

[ADMIN] regexp_replace grief

2013-04-10 Thread Armin Resch
Not sure this is the right list to vent about this but here you go: I) select regexp_replace('BEFORE.AFTER','(.*)\..*','\1','g') "Substring" II) select regexp_replace('BEFORE.AFTER','(.*)\\..*','\\1','g') "Substring" Executing (II) against pg 8.4.4 or 9.0.4 yields 'BEFORE', but in order for 9.1.7