Re: AREs in substring(from) - Mailing list pgsql-general

From Tom Lane
Subject Re: AREs in substring(from)
Date
Msg-id 4737.1103734201@sss.pgh.pa.us
Whole thread Raw
In response to AREs in substring(from)  (Brandon Craig Rhodes <brandon@oit.gatech.edu>)
List pgsql-general
Brandon Craig Rhodes <brandon@oit.gatech.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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Strange Index behavior
Next
From: Tom Lane
Date:
Subject: Re: valid using INITIALLY DEFERRED