[FIX] regex for punctuation and special chars

This commit is contained in:
2021-10-23 15:12:46 +01:00
parent e9631211a2
commit 87a0f612ae

View File

@@ -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, "");
}