import java.util.regex.*;
class Main{
public static void main(String args[]){
String content =
"I am a " +
"student from Central South University.";
String pattern =
".*from.*";
boolean isMatch = Pattern.matches(pattern, content);
System.out.println(
"字符串中是否包含了 'from' 子字符串? " + isMatch);
}
}