I'm using a regex to test the validity of a name. This is the code:
if (!/^[A-Za-zÀ-Ÿ- ]+$/.test(value)) {
doSomething()
}
Unfortunately in the browser I get this error:
Uncaught SyntaxError: Invalid regular expression: /^[A-Za-zÀ-ȕ- ]+$/: Range out of order in character class.
The minified js has the code correctly compiled, but I load this .js file in .jsp file on my server. How does this influence the final messed up expression that I ended up with?