public static <T extends CharSequence>T eachMatch(T self,Pattern pattern,@ClosureParams(value=FromString.class,options={"List<String>","String[]"}) Closure closure){
  eachMatch(self.toString(),pattern,closure);
  return self;
}

public static < T extends CharSequence > T eachMatch ( T self , Pattern pattern , @ ClosureParams ( value = FromString . class , options = { "List<String>" , "String[]" } ) Closure closure ) { eachMatch ( self . toString ( ) , pattern , closure ) ; return self ; }
process each regex group matched substring of the given pattern . if the closure parameter takes one argument , an array with all match groups is passed to it . if the closure takes as many arguments as there are match groups , then each parameter will be one match group .
