I want such a validation that My String must be contains at least one alphabet.
I am using the following:
String s = "111a11";
boolean flag = s.matches("%[a-zA-Z]%");
flag gives me false
even though a
is in my string s
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…