Regular expression to catch letters beyond a-z

后端 未结 6 812
南方客
南方客 2020-12-16 02:26

A normal regexp to allow letters only would be \"[a-zA-Z]\" but I\'m from, Sweden so I would have to change that into \"[a-zåäöA-ZÅÄÖ]\". But suppose I don

6条回答
  •  萌比男神i
    2020-12-16 03:09

    All chars are "valid," so I think you're really asking for chars that are "generally considered to be letters" in a locale.

    The Unicode specification has some guidelines, but in general the answer is "no," you would need to list the characters you decide are "letters."

提交回复
热议问题