Javascript regex for validating name without accented characters -
i'm using simple javascript regular expression validate people's names. however, not want allow user enter accented characters ã, ä, õ, ö, etc. aware these can valid characters in name, exercise, need able filter them out.
my current regex:
^[a-za-z]+('|-|.|)[a-za-z\s]+$ this matches accented characters well. how modify regex doesn't match names accents (or unicode character, matter)?
remove ., because . match character. cause matching accented character.
^[a-za-z]+('|-)[a-za-z\s]+$ or escape . if mean literal dot.
^[a-za-z]+('|-|\.)[a-za-z\s]+$
Comments
Post a Comment