Re: Sv: Re: Sv: Re: regex match and special characters - Mailing list pgsql-general

From Tom Lane
Subject Re: Sv: Re: Sv: Re: regex match and special characters
Date
Msg-id 13258.1534432689@sss.pgh.pa.us
Whole thread Raw
In response to Sv: Re: Sv: Re: regex match and special characters  (Andreas Joseph Krogh <andreas@visena.com>)
List pgsql-general
Andreas Joseph Krogh <andreas@visena.com> writes:
> When using E-syntax you need to double the backslash for escaping:
> andreak@[local]:5433 10.4 andreak=# select 'abcd'||chr(8198) ~ E'abcd\\s'; 

Another thing to keep in mind is that this is all locale-dependent
(specifically, LC_CTYPE, I believe).  In plain old C locale, nothing
beyond the standard ASCII whitespace characters will match \s.  I'm not
sure how universal it is for other locales to treat characters like
U+2006 as whitespace.

            regards, tom lane


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Sv: Re: Sv: Re: regex match and special characters
Next
From: Adrian Klaver
Date:
Subject: Re: Sv: Re: Sv: Re: regex match and special characters