We need to allow the German umlauts for the user to enter as part of user name. While we add


This is not working as expected and we just get an error as "Facing Technical difficulty"

  • Have you tried to encode umlets? So use ^[A-Za-z0-9äöüÄÖÜß-.]+...?
    – Marek Musielak
    Commented Nov 14, 2017 at 8:58

3 Answers 3


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.


Update following comment of @Marek Musielak. It seems that under -. @PVM have meant either . or - characters. In regular expression these characters should be escaped:

  • So there should be \` character before -, right? - should not be removed?
    – Marek Musielak
    Commented Nov 14, 2017 at 10:57
  • Yes, if @PVM wants to use '-' character then it should be escaped "\-". I was not sure, why this symbol was added, but it definitely causes issue
    – Anton
    Commented Nov 14, 2017 at 11:31
/^[ A-Za-z\-_.\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF.~\\-]*$/

Please try to use this one.


Try this one.

^[ A-Za-z\u00C0-\u017F.~\\-]*$
  • 1
    Can you add some more details about what you fixed and how it works? Commented Apr 5, 2019 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.