Possible RegEx bug for lower-case a and s characters - Mailing list pgsql-bugs

From DeFreitas, Nigel
Subject Possible RegEx bug for lower-case a and s characters
Date
Msg-id DS7PR13MB4669739075A144889C9E83C09D049@DS7PR13MB4669.namprd13.prod.outlook.com
Whole thread Raw
Responses Re: Possible RegEx bug for lower-case a and s characters
List pgsql-bugs

We observed that when we used this RegEx expression: [\s+|"]|[\n\r\f\a\t]|[^[:ascii:]]

The lowercase letters “a”, and “s” were also stripped from our data columns.

 

The RegEx expression seems to be error free as described here:

 

Text

Description automatically generated

 

 

Sample SQL to test:

 

select regexp_replace('Nigel DeFreit a  s', E'[\s+|"]|[\n\r\f\a\t]|[^[:ascii:]]','','g') AS result;

 

 




This email is intended solely for the recipient. It may contain privileged, proprietary or confidential information or material. If you are not the intended recipient, please delete this email and any attachments and notify the sender of the error.
Attachment

pgsql-bugs by date:

Previous
From: Brennan Vincent
Date:
Subject: Inaccurate documentation about identifiers
Next
From: Ron Clarke
Date:
Subject: jsonb_path_query unexpected results when filter key / path does not exist..