pattern.matcher(input) always creates a new matcher, so you’d need to call matches() again.
Try:
Matcher m = responseCodePattern.matcher(firstHeader);
m.matches();
m.groupCount();
m.group(0); //must call matches() first
...
pattern.matcher(input) always creates a new matcher, so you’d need to call matches() again.
Try:
Matcher m = responseCodePattern.matcher(firstHeader);
m.matches();
m.groupCount();
m.group(0); //must call matches() first
...