Re: AREs in substring(from)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brandon Craig Rhodes <brandon(at)oit(dot)gatech(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: AREs in substring(from)
Date: 2004-12-22 16:50:01
Message-ID: 4737.1103734201@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Brandon Craig Rhodes <brandon(at)oit(dot)gatech(dot)edu> writes:
> As the documentation leads me to expect, my Postgresql 7.4
> installation produces:
> select substring('Bar, Foo' FROM '.') -> 'B'
> but even though my regex_flavor = advanced,
> select substring('Bar, Foo' FROM '\\w') -> NULL
> select substring('Bar, Foo' FROM '***:\\w') -> NULL
> whereas I expect these to produce 'B' as well. What am I missing?

[ scratches head... ] It works for me.

regression=# select substring('Bar, Foo' FROM '\\w');
substring
-----------
B
(1 row)

regression=# select substring('Bar, Foo' FROM '***:\\w');
substring
-----------
B
(1 row)

What locale and encoding are you using?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-12-22 16:55:39 Re: valid using INITIALLY DEFERRED
Previous Message Tom Lane 2004-12-22 16:46:54 Re: Strange Index behavior