Concrete Javascript Regex for Accented Characters (Diacritics)

后端 未结 9 1087
庸人自扰
庸人自扰 2020-11-22 17:22

I\'ve looked on Stack Overflow (replacing characters.. eh, how JavaScript doesn\'t follow the Unicode standard concerning RegExp, etc.) and haven\'t really found a concrete

9条回答
  •  耶瑟儿~
    2020-11-22 17:34

    What about this?

    ^([a-zA-Z]|[à-ú]|[À-Ú])+$
    

    It will match every word with accented characters or not.

提交回复
热议问题