I have the folowing code in Java
Pattern pattern = Pattern.compile("[a-zA-Z]+", Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher("1A");
boolean matchFound = matcher.find();
if(matchFound) {
System.out.println("Match found");
} else {
System.out.println("Match not found");
}
The result of that says that 1A match the regex "[a-zA-Z]+".
I only need to accept words starting with a letter.
I did the same in question.