|
Greetings,
I would like a little help about regex matter in Java.
Supposing that I want to check if a TextField contains only Strings not Numbers, which is the code to accomplish this?
I tried :
String str = new String();
if (str.matches("[a-zA-Z]")) {}
else {}
When it comes for the user to enter more than one character in the TextField, it doesn't work. It works only for one character!
Any help appreciated,
jimmius
|