校验字符串是否只包含英文字母

str.matches("^[a-zA-Z]*")
只包含字母,返回true
含有除字母外其他字符,返回false

猜你喜欢

转载自www.cnblogs.com/zwakeup/p/10567453.html