From c78eea15d09b4f41bde8b6710440f1453c12b214 Mon Sep 17 00:00:00 2001 From: Pluto0104 Date: Mon, 21 Aug 2023 09:46:43 -0700 Subject: [PATCH] updated alphabetic and latin letter regex --- src/CONST.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index a0c6cbf2bcf3..ad7e51eef896 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -1107,8 +1107,8 @@ const CONST = { REGEX: { SPECIAL_CHARS_WITHOUT_NEWLINE: /((?!\n)[()-\s\t])/g, DIGITS_AND_PLUS: /^\+?[0-9]*$/, - ALPHABETIC_AND_LATIN_CHARS: /^[a-zA-ZÀ-ÿ ]*$/, - NON_ALPHABETIC_AND_NON_LATIN_CHARS: /[^a-zA-ZÀ-ÿ]/g, + ALPHABETIC_AND_LATIN_CHARS: /^[\p{Script=Latin} ]*$/u, + NON_ALPHABETIC_AND_NON_LATIN_CHARS: /[^\p{Script=Latin}]/gu, POSITIVE_INTEGER: /^\d+$/, PO_BOX: /\b[P|p]?(OST|ost)?\.?\s*[O|o|0]?(ffice|FFICE)?\.?\s*[B|b][O|o|0]?[X|x]?\.?\s+[#]?(\d+)\b/, ANY_VALUE: /^.+$/,