Dear List,
I found this interesting:
SELECT regexp_matches('123-A' , E'(3[A-Z\- ])');
ERROR: invalid regular expression: invalid character range
whereas:
SELECT regexp_matches('123-A' , E'(3[\- A-Z])');
regexp_matches
{3-}
(1 row)
Notice the order of (escaped) characters
On 13 December 2011 14:04, InterRob rob.mar...@gmail.com wrote:
Dear List,
I found this interesting:
SELECT regexp_matches('123-A' , E'(3[A-Z\- ])');
ERROR: invalid regular expression: invalid character range
whereas:
SELECT regexp_matches('123-A' , E'(3[\- A-Z])');
regexp_matches
True, but still weird...
And are you sure it does the same thing?
2011/12/13 Szymon Guz mabew...@gmail.com
On 13 December 2011 14:04, InterRob rob.mar...@gmail.com wrote:
Dear List,
I found this interesting:
SELECT regexp_matches('123-A' , E'(3[A-Z\- ])');
ERROR: invalid regular
On Dec 13, 2011, at 8:09, Szymon Guz mabew...@gmail.com wrote:
On 13 December 2011 14:04, InterRob rob.mar...@gmail.com wrote:
Dear List,
I found this interesting:
SELECT regexp_matches('123-A' , E'(3[A-Z\- ])');
ERROR: invalid regular expression: invalid character range
whereas:
Thanks guys, i see what you mean.
I do intend to use the PG escaping, in order to avoid that annoying
warning... Hence, my expression should indeed be:
SELECT regexp_matches('123-A' , E'(3[A-Z\\-\\(\\) ])');
In the above expression i added the parentheses as I whish to match these
as well :))
On Tue, Dec 13, 2011 at 02:51:15PM +0100, InterRob wrote:
Thanks guys, i see what you mean.
I do intend to use the PG escaping, in order to avoid that annoying
warning... Hence, my expression should indeed be:
SELECT regexp_matches('123-A' , E'(3[A-Z\\-\\(\\) ])');
In the above expression
On Tue, Dec 13, 2011 at 7:51 AM, InterRob rob.mar...@gmail.com wrote:
Thanks guys, i see what you mean.
I do intend to use the PG escaping, in order to avoid that annoying
warning... Hence, my expression should indeed be:
SELECT regexp_matches('123-A' , E'(3[A-Z\\-\\(\\) ])');
In the above
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Merlin Moncure
Sent: Tuesday, December 13, 2011 11:39 AM
To: r...@marjot-multisoft.com
Cc: David Johnston; Szymon Guz; pgsql-general
Subject: Re: [GENERAL] order of (escaped
On Tue, Dec 13, 2011 at 10:53 AM, David Johnston pol...@yahoo.com wrote:
Aside from backward compatibility, and the various warnings, is there any
reason to prefer dollar-quoting over a non-SQL-escaped string literal (i.e.,
'3[A-Z\-\(\) ]' ) ?
yeah -- because sooner or later you have to
True, but still weird...
And are you sure it does the same thing?
2011/12/13 Szymon Guz mabew...@gmail.com
On 13 December 2011 14:04, InterRob rob.mar...@gmail.com wrote:
Dear List,
I found this interesting:
SELECT regexp_matches('123-A' , E'(3[A-Z\- ])');
ERROR: invalid regular
10 matches
Mail list logo