Re: Bizarre behavior of \w in a regular expression bracket construct

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Joel Jacobson" <joel@compiler.org>
Cc: "Alvaro Herrera" <alvherre@alvh.no-ip.org>, pgsql-hackers@lists.postgresql.org
Date: 2021-02-24T17:14:47Z
Lists: pgsql-hackers

Attachments

I wrote:
> I've also decided after reflection that the patch should indeed
> create a named "word" character class.  That's allowed per POSIX,
> and it simplifies some aspects of the documentation, since we can
> rely on referencing the class instead of repeating ourselves.
> The attached 0001 v2 does that; it's otherwise the same as before.

Sigh, this time with the attachments ...

			regards, tom lane

Commits

  1. Doc: remove src/backend/regex/re_syntax.n.

  2. Change regex \D and \W shorthands to always match newlines.

  3. Allow complemented character class escapes within regex brackets.