unicode - Javascript regex alphabetic with few international characters -


I need a javascript function to validate the alphabetical input with some extra characters from Italian languages, that is: < Code> èìòòù

I saw a regex first with something like this:

  [\ u00A0- \ uD7FF \ uF900- \ uFDCF \ uFDF0- \ uFFEF ]  

Those codes have been nominated and where can I get the right answer?
I want to use them in the following tasks:

  function val_alpha_it (str) {var re = / [^ A-Za-z] / return re.test (str) ; }    

If the encoding for your script works well, then you can only type these characters Negative set in regular review:

  function val_alpha_it (str) {return /[^A-Za-zàèéìòóù]/.test(str); }  

If you need to specify the characters by using the character code, these are unicode code points. You can see them. For example, the character code is 00E0 , so you write it as \ u00E0 . Therefore, the character code will be saved, the code will be:

  function val_alpha_it (str) {return / [^ azza-jade \ u00E0 \ u00E8 \ u00E9 \ u00EC \ u00F2 \ u00F3 \. U00F9] / test (STR); }  

Comments