From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Joseph Krogh <andreas@visena.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Sv: Re: Sv: Re: regex match and special characters
Date: Thu, 16 Aug 2018 11:18:09 -0400
Message-ID: <13258.1534432689@sss.pgh.pa.us> (raw)
In-Reply-To: <VisenaEmail.3c.a2f490fd2f459412.1654333b814@tc7-visena>
References: <VisenaEmail.3c.a2f490fd2f459412.1654333b814@tc7-visena>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, andreas@visena.com, adrian.klaver@aklaver.com
Subject: Re: regex match and special characters
In-Reply-To: <13258.1534432689@sss.pgh.pa.us>
References: <VisenaEmail.3c.a2f490fd2f459412.1654333b814@tc7-visena> <13258.1534432689@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox