标签:
1、正则表达式的应用范例:
public class Test {
public static void main(String[] args) {
String regex=".*#NNI#.*";
String shuru="hkjhk#NNI#sdsdds";
Pattern p= Pattern.compile(regex);
Matcher m=p.matcher(shuru);
System.out.println(m.matches());
}
}
//输出:true
标签:
原文地址:http://www.cnblogs.com/xiangjianmanbu/p/5853209.html