Open GuillaumeDgr opened 3 years ago
You can remove accents beforehand with the code:
myString.normalize('NFD').replace(/\p{Diacritic}/gu, '')
Hi, many thanks ! But I have an error : Parsing error: Invalid regular expression: /\p{Diacritic}/: Invalid escape
That's from 2021 onwards, so it would depend on where you're executing it (Node/browser). You can try one of the other options here: https://stackoverflow.com/a/37511463 such as:
str.normalize("NFD").replace(/[\u0300-\u036f]/g, "")
Hi,
With french-badwords-list added, all accented words are not filtered... Any help pls ? (https://github.com/darwiin/french-badwords-list#readme) Thanks