Regular expression to catch letters beyond a-z

后端 未结 6 806
南方客
南方客 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条回答
  •  自闭症患者
    2020-12-16 03:05

    What about \p{name} ?

    Matches any character in the named character class specified by {name}. Supported names are Unicode groups and block ranges. For example, Ll, Nd, Z, IsGreek, IsBoxDrawing.

    I don't know enough about unicode, but maybe your characters fit a unicode class?

提交回复
热议问题