Matcher(Pattern parent,CharSequence text){
  this.parentPattern=parent;
  this.text=text;
  int parentGroupCount=Math.max(parent.capturingGroupCount,10);
  groups=new int[parentGroupCount * 2];
  locals=new int[parent.localCount];
  reset();
}

Matcher ( Pattern parent , CharSequence text ) { this . parentPattern = parent ; this . text = text ; int parentGroupCount = Math . max ( parent . capturingGroupCount , 10 ) ; groups = new int [ parentGroupCount * 2 ] ; locals = new int [ parent . localCount ] ; reset ( ) ; }
all matchers have the state used by pattern during a match .
