用于验证单词的正则表达式也带有重音符号

时间:2017-04-24 11:55:07

标签: javascript regex diacritics

我的正则表达式验证单词(也包含数字),但带有重音符号的单词无法正确验证。

/^[a-zA-Z0-9_]*$/i.test(word)

例如:

car => true

plantas => true

avião => false (but this should be also true)

我的正则表达式应该如何更改以使用重音?

0 个答案:

没有答案