package regular_expression;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test {
public static void main(String[] args) {
Pattern pattern = Pattern.compile("^the");
Matcher matcher1 = pattern.matcher("the is");
Matcher matcher2 = pattern.matcher("there");
boolean matches1 = matcher1.matches();
boolean matches2 = matcher1.matches();
System.out.println(matches1);
System.out.println(matches2);
}
}