java字符串子串

import java.util.regex.*;

class Regex1 {
	public static void main(String args[]) {
		String str = "For my money, the important thing ";
		String regEx = "mo";
		boolean result = Pattern.compile(regEx).matcher(str).find();
		System.out.println(result);
	}
}

你可能感兴趣的:(java,String,Class,regex,import)