pattern.matcher(input)总是会创建一个新的匹配器,因此您需要
matches()再次致电。
尝试:
Matcher m = responseCodePattern.matcher(firstHeader);m.matches();m.groupCount();m.group(0); //must call matches() first...

pattern.matcher(input)总是会创建一个新的匹配器,因此您需要
matches()再次致电。
尝试:
Matcher m = responseCodePattern.matcher(firstHeader);m.matches();m.groupCount();m.group(0); //must call matches() first...