Regex for Umlaut

前端 未结 5 1754
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 05:56

I am using JS Animated Contact Form with this line of validation regex:

rx:{\".name\":{rx:/^[a-zA-Z\'][a-zA-Z-\' ]+[a-zA-Z\']?$/,target:\'input\'}, other fie         


        
5条回答
  •  抹茶落季
    2020-11-30 06:23

    I came up with a combination of different ranges:

    [A-Za-zÀ-ž\u0370-\u03FF\u0400-\u04FF]
    
    • Diacritical Marks: [À-ž]
    • Greek and Coptic: [\u0370-\u03FF]
    • Cyrillic: [\u0400-\u04FF]

    But I see that it misses some letters of @SambitD proposal, refer to: https://rubular.com/r/2g00QJK4rBS8Y4

提交回复
热议问题