package cn.wzt;
import java.util.regex.Pattern;
public class Reg4 {
public static void main(String[] args) {
//var p1 = Pattern.compile("\\d");
var p1 = Pattern.compile("[a-z]{1,}");
//var p2 = Pattern.compile("[a-zA-Z]{1,}");
var p2 = Pattern.compile("[a-z]{1,}", Pattern.CASE_INSENSITIVE);
//var p2 = Pattern.compile("[a-z]{1,}", 2);
//输出正则表达式,字符串
System.out.println(p2);
System.out.println(p2.toString());
System.out.println(p2.pattern());
}
}