Postgres: Regex support foreign characters (#5598)
* Fix issue #5293 * Fix issue #5293 * add test * Revert "add test" This reverts commit 38b32a627a9d2c9a9b852b48194f173d8b7254f3. * fix conflicts * use native package
This commit is contained in:
committed by
Diamond Lewis
parent
b178d5ca6a
commit
ad7fc48c97
@@ -2441,7 +2441,8 @@ function createLiteralRegex(remaining) {
|
||||
return remaining
|
||||
.split('')
|
||||
.map(c => {
|
||||
if (c.match(/[0-9a-zA-Z]/) !== null) {
|
||||
const regex = RegExp('[0-9 ]|\\p{L}', 'u'); // Support all unicode letter chars
|
||||
if (c.match(regex) !== null) {
|
||||
// don't escape alphanumeric characters
|
||||
return c;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user