Regex for Umlaut

前端 未结 5 1756
没有蜡笔的小新
没有蜡笔的小新 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:34

    You should use in your regex unicode codes for characters, like \u0080. For German language, I found following table:

    Zeichen     Unicode
    ------------------------------
    Ä, ä        \u00c4, \u00e4
    Ö, ö        \u00d6, \u00f6
    Ü, ü        \u00dc, \u00fc
    ß           \u00df
    

    (source http://javawiki.sowas.com/doku.php?id=java:unicode)

提交回复
热议问题