开发者

Regular expression in android for accept only English language

I try

Pattern.matches(开发者_开发百科"[A-Za-z]+"

and it still can accept other languages such as ฟฟฟฟabc or abcฟฟฟ

what should I do?


^[A-Za-z]+$

Use start-of-string and end-of-string anchors.

If you don't, the regex does not have to match the entire string, but this is what you seem to want.


Are you working in UTF-8? Have you tried the \uFFFF, where FFFF is the hex representation of the Unicode character.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜