大家好!
我想问下 下面这个代码片段中,
Pattern pt=Pattern.compile((regexURL)(titleRegex)(urlsRegex));//这里为什么会报错?  { 
   int counter=0;//计算器 计算匹配的个数
  
   String regexURL="<a href=\"http://blog.sina.com.cn/s/.*?\\.html\".*?>.*?/a>";
   String titleRegex=">.*?</a>";
   String urlsRegex="http://.*?\\.html";
   //Pattern pt=Pattern.compile((regexURL)(titleRegex)(urlsRegex));//这里为什么会报错?
          Pattern pt=Pattern.compile((regexURL));// 这样是对的。但是为什么上一行会出现编译错误?
   Matcher mt=pt.matcher(s);
  
   while(mt.find())
   {
    String s2=mt.group();
    counter++;
    System.out.println(mt.group());
  // System.out.println(mt.group(2));
  // System.out.println(mt.group(3));
  
   System.out.println();//空行
    
    
   }
  
    System.out.println("共有"+counter+"个符合结果");
  }