public static Iterable<MatchResult> findMatches(Pattern pattern,CharSequence s){
  List<MatchResult> results=new ArrayList<MatchResult>();
  for (Matcher m=pattern.matcher(s); m.find(); )   results.add(m.toMatchResult());
  return results;
}

public static Iterable < MatchResult > findMatches ( Pattern pattern , CharSequence s ) { List < MatchResult > results = new ArrayList < MatchResult > ( ) ; for ( Matcher m = pattern . matcher ( s ) ; m . find ( ) ; ) results . add ( m . toMatchResult ( ) ) ; return results ; }
find all the matches of a pattern in a charsequence and return the results as list .
