java中正则表达式是一个字符串吗
java中正则表达式是一个字符串吗
日期:2017-01-04 14:11:47 人气:2
不是的,是一种方法,用java正则表达式检测字符串中含有某字符方法:
public class Test {
public static void main(String[] args) {
String str="Hello World"; //待判断的字符串
String reg=".*ll.*"; //判断字符串中是否含有ll
System.out.pr