点击运行
public class Main { public static void main(String args[]) { String Str = new String("Welcome to jiyik.com"); System.out.print("Return Value :" ); System.out.println(Str.matches("(.*)jiyik(.*)")); System.out.print("Return Value :" ); System.out.println(Str.matches("jiyik")); System.out.print("Return Value :" ); System.out.println(Str.matches("Welcome(.*)")); } }
运行结果 :
正在执行...