Please, explain me one thing. I have different strings like a
String s1 = ".q2q"
or String s2 = "qewq"
I want to check whether these strings consists of [a-zA-Z] only.
But i know how to check only one character: if (s.matches("\\w")) System.out.println(true);
I dont understand how to use *
to check all string.
Please, help me.
Aucun commentaire:
Enregistrer un commentaire