Possible RegEx bug for lower-case a and s characters

From: "DeFreitas, Nigel" <nigel(dot)defreitas(at)verisk(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Possible RegEx bug for lower-case a and s characters
Date: 2022-11-16 20:30:05
Message-ID: DS7PR13MB4669739075A144889C9E83C09D049@DS7PR13MB4669.namprd13.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ron Clarke 2022-11-16 20:45:26 jsonb_path_query unexpected results when filter key / path does not exist..
Previous Message Brennan Vincent 2022-11-16 13:36:03 Inaccurate documentation about identifiers