Re: Sv: Re: Sv: Re: regex match and special characters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Joseph Krogh <andreas(at)visena(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Sv: Re: Sv: Re: regex match and special characters
Date: 2018-08-16 15:18:09
Message-ID: 13258.1534432689@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> When using E-syntax you need to double the backslash for escaping:
> andreak(at)[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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-08-16 15:19:04 Re: Sv: Re: Sv: Re: regex match and special characters
Previous Message Adrian Klaver 2018-08-16 15:13:40 Re: Sv: Re: Sv: Re: regex match and special characters