Regex for names with special characters (Unicode)

前端 未结 7 2205
太阳男子
太阳男子 2020-11-28 09:28

Okay, I have read about regex all day now, and still don\'t understand it properly. What i\'m trying to do is validate a name, but the functions i can find for this on the i

相关标签:
7条回答
  • 2020-11-28 10:16

    you can add the allowed special chars to the regex.

    example:

    [a-zA-ZßöäüÖÄÜæé]+
    

    EDIT:

    not the best solution, but this would give a result if there are at least to words.

    [a-zA-ZßöäüÖÄÜæé]+\s[a-zA-ZßöäüÖÄÜæé]+
    
    0 讨论(0)
提交回复
热议问题