\W excludes underscore - Mailing list pgsql-docs

From Erwin Brandstetter
Subject \W excludes underscore
Date
Msg-id CAGHENJ7xxZXerZKo2e4x+AB27jNgbjmYM370ORqEP=jK_Kdb_g@mail.gmail.com
Whole thread Raw
Responses Re: \W excludes underscore  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-docs
Table 9.19. Regular Expression Class-shorthand Escape:

> \w [[:alnum:]_] (note underscore is included)
> ...
> \W [^[:alnum:]_] (note underscore is included)

This is misleading as \w *includes* underscore, but \W *excludes* it. I suggest:
 
\w [[:alnum:]_] (underscore is included)
...
\W [^[:alnum:]_] (underscore is excluded)


Regards
Erwin

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Latest ISO is 2016, not 2011
Next
From: "David G. Johnston"
Date:
Subject: Re: \W excludes underscore