I\'m looking to included the Latin characters below in a JavaScript regex for a string validation.
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏàáâãäåæçèéêëìíîïÐÑÒÓÔÕÖØÙÚÛÜÝÞßðñòóôõöøùúûüýþÿ
I'm using:
/^[A-z\u00C0-\u00ff\s'\.,-\/#!$%\^&\*;:{}=\-_`~()]+$/
as regular expression
var regexp = /[A-z\u00C0-\u00ff]+/g,
ascii = ' hello !@#$%^&*())_+=',
latin = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏàáâãäåæçèéêëìíîïÐÑÒÓÔÕÖØÙÚÛÜÝÞßðñòóôõöøùúûüýþÿ',
chinese = ' 你 好 ';
console.log(regexp.test(ascii)); // true
console.log(regexp.test(latin)); // true
console.log(regexp.test(chinese)); // false
Glist: https://gist.github.com/germanattanasio/84cd25395688b7935182