From 87a0f612ae6ae4adca1623faf78e1605ce83b89c Mon Sep 17 00:00:00 2001 From: Matthew Grove Date: Sat, 23 Oct 2021 15:12:46 +0100 Subject: [PATCH] [FIX] regex for punctuation and special chars --- functions/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/index.js b/functions/index.js index f4577c0..3efd724 100644 --- a/functions/index.js +++ b/functions/index.js @@ -458,7 +458,7 @@ function arraysHaveSameMembers(arr1, arr2) { * @return {string} The original string with the unwanted characters removed. */ function cleanseVocabString(item) { - const chars = /[ °"§%()\[\]{}=\\?´`'#<>|,;.:+_-!£$^&*~/]+/g; + const chars = /[\p{P}\p{S} ]+/ug; return item.replace(chars, ""); }