Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
196
rated 0 times [  199] [ 3]  / answers: 1 / hits: 67473  / 10 Years ago, tue, february 25, 2014, 12:00:00

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 fields...


I just found out, that I can't enter name like Müller. The regex will not accept this. What do I have to do, to allow also Umlauts?


More From » regex

 Answers
104

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)


[#72314] Monday, February 24, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
makaylahk

Total Points: 166
Total Questions: 94
Total Answers: 117

Location: Gabon
Member since Sat, Jul 25, 2020
4 Years ago
;