Regular expression for [a-zA-Z] [closed]

女生的网名这么多〃 提交于 2019-12-04 14:02:54

You are asking for a shorthand class for English letters.

In case you are using POSIX-compliant regex, [:alpha:] is the "bracket expression" for [a-zA-Z] class. It is also supported by PCRE (Perl, PHP, Ruby...).

In Java, you can use \p{Alpha}.

In .NET, PCRE, Java, \p{L} is more than just [a-zA-Z] as it might include all Unicode letters. Still, it can be used to capture only letters.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!