I am trying to write a small javascript validation to allow english and french alphabets. This is how I have the regex...but its returning false. I was looking at this
Check whether a string matches a regex
var string = "évaÀ";
var re = new RegExp("/[^a-zA-Z àâäèéêëîïôœùûüÿçÀÂÄÈÉÊËÎÏÔŒÙÛÜŸÇ]/");
if (re.test(string)) {
console.log("true");
} else {
console.log("false");
}
What am I doing wrong? Here is a fiddle