We need to allow the German umlauts for the user to enter as part of user name. While we add
^[A-Za-z0-9äöüÄÖÜß-.]+(?:[._-][A-Za-z0-9äöüÄÖÜß-.]+)*$
This is not working as expected and we just get an error as "Facing Technical difficulty"
We need to allow the German umlauts for the user to enter as part of user name. While we add
^[A-Za-z0-9äöüÄÖÜß-.]+(?:[._-][A-Za-z0-9äöüÄÖÜß-.]+)*$
This is not working as expected and we just get an error as "Facing Technical difficulty"
I think that your regular expression is not correct. "-" sign in regular expressions is used to match any from range of characters. e.g.: A-Z
or a-z
. You have range that is not closed: ß-
I removed "-" sign and it started to work for me.
^[A-Za-z0-9äöüÄÖÜß.]+(?:[._-][A-Za-z0-9äöüÄÖÜß.]+)*$
Update following comment of @Marek Musielak. It seems that under -.
@PVM have meant either .
or -
characters. In regular expression these characters should be escaped:
^[A-Za-z0-9äöüÄÖÜß\-\.]+(?:[._-][A-Za-z0-9äöüÄÖÜß\-\.]+)*$
\`
character before -
, right? -
should not be removed?
– Marek Musielak
Nov 14 '17 at 10:57
/^[ A-Za-z\-_.\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF.~\\-]*$/
Please try to use this one.
Try this one.
^[ A-Za-z\u00C0-\u017F.~\\-]*$
^[A-Za-z0-9äöüÄÖÜß-.]+
...? – Marek Musielak Nov 14 '17 at 8:58