I want to do some basic String testing in Node.js. Suppose I have a form in which users enter their name, and I want to check if it is just trash or a real name.
Fortunately (or, unfortunately, for my verification), I get users from all over the world, which means that their names contain non-English characters, for example ä ö ü ß é. I used to use /[A-Za-z -]{2,}/, but this does not match the type names "Jan Buschtöns".
Do I need to manually add all possible non-English, but Latin characters to my RegEx? I do not want another 100 characters stored in the registry, for example /[A-Za-z -äöüÄÖÜßéÉèÈêÊ...]{2,}/.
source
share