public static <T> List<T> findAll(CharSequence self, CharSequence regex, @ClosureParams(value=SimpleType.class, options="java.lang.String[]") Closure<T> closure) {
        return findAll(self, Pattern.compile(regex.toString()), closure);
    }
public static < T > List < T > findAll ( CharSequence self , CharSequence regex , @ ClosureParams ( value = SimpleType . class , options = "java.lang.String[]" ) Closure < T > closure ) { return findAll ( self , Pattern . compile ( regex . toString ( ) ) , closure ) ; }
Finds all occurrences of a regular expression string within a CharSequence.   Any matches are passed to the specified closure.  The closure
is expected to have the full match in the first parameter.  If there are any capture groups, they will be placed in subsequent parameters.
<p>
If there are no matches, the closure will not be called, and an empty List will be returned.
<p>
For example, if the regex doesn't match, it returns an empty list:
<pre>
assert [] == "foo".findAll(/(\w*) Fish/) { match, firstWord -> return firstWord }
</pre>
Any regular expression matches are passed to the closure, if there are no capture groups, there will be one parameter for the match:
<pre>
assert ["couldn't", "wouldn't"] == "I could not, would not, with a fox.".findAll(/.ould/) { match -> "${match}n't"}
</pre>
If there are capture groups, the first parameter will be the match followed by one parameter for each capture group:
<pre>
def orig = "There's a Wocket in my Pocket"
assert ["W > Wocket", "P > Pocket"] == orig.findAll(/(.)ocket/) { match, firstLetter -> "$firstLetter > $match" }
</pre>

@param self    a CharSequence
@param regex   the capturing regex CharSequence
@param closure will be passed the full match plus each of the capturing groups (if any)
@return a List containing all results from calling the closure with each full match (and potentially capturing groups) of the regex within the CharSequence, an empty list will be returned if there are no matches
@see #findAll(CharSequence, Pattern, groovy.lang.Closure)
@since 1.8.2