Re: Expected behaviour of \d in regexp with exponent numbers ? - Mailing list pgsql-general

From Vick Khera
Subject Re: Expected behaviour of \d in regexp with exponent numbers ?
Date
Msg-id CALd+dceBmKQYd+ikQ-NRjf-FU3vxcKSYvXAj2=zOGZbo5fhVCQ@mail.gmail.com
Whole thread Raw
In response to Re: Expected behaviour of \d in regexp with exponent numbers ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, Sep 1, 2014 at 12:11 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I wonder whether this was a bad idea.  I think it's unsurprising for the
> definition of "alphanumeric" to depend on locale, but I bet most people
> are not expecting \d to vary that way.

FWIW, tha Perl man page on unicode (perldoc perlunicode) says:

<quote>
It is worth stressing that there are several different sets of digits
in Unicode that are equivalent to 0-9 and are matchable by "\d" in a
regular expression.  If they are used in a single language only, they
are in that language's "Script" and "Script_Extension". ...
</quote>

When working with Unicode/UTF8, I do not think it is safe to assume \d
matches only ASCII [0-9].


pgsql-general by date:

Previous
From: David G Johnston
Date:
Subject: Re: copymanager question
Next
From: Adrian Klaver
Date:
Subject: Re: Re: Timezone difference between Oracle SYSDATE and PostgreSQL timestamp functions