True, but still weird...
And are you sure it does the same thing?
2011/12/13 Szymon Guz
>
>
> On 13 December 2011 14:04, InterRob wrote:
>
>> Dear List,
>>
>> I found this interesting:
>>
>> SELECT regexp_matches('123-A' , E'(3[A-Z\- ])');
>> ERROR: invalid regular expression: invalid charact
On Tue, Dec 13, 2011 at 10:53 AM, David Johnston 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 stick a single quo
-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 7:51 AM, 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 i a
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 expr
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 :))
Th
On Dec 13, 2011, at 8:09, Szymon Guz wrote:
>
>
> On 13 December 2011 14:04, InterRob 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('12
True, but still weird...
And are you sure it does the same thing?
2011/12/13 Szymon Guz
>
>
> On 13 December 2011 14:04, InterRob wrote:
>
>> Dear List,
>>
>> I found this interesting:
>>
>> SELECT regexp_matches('123-A' , E'(3[A-Z\- ])');
>> ERROR: invalid regular expression: invalid charact
On 13 December 2011 14:04, InterRob 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
>
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 and
10 matches
Mail list logo