import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
//[a-zA-Z] means from a to z or A to Z, * means many of none of them
Pattern p = Pattern.compile("[a-zA-Z]*");
Matcher m = p.matcher("aadddaaiiiii");
boolean b = m.matches();
System.out.println(b);
}
}
No comments:
Post a Comment