code: public static <T> T splitEachLine(CharSequence self, CharSequence regex, @ClosureParams(value=FromString.class,options="List<String>") Closure<T> closure) throws IOException {
          return splitEachLine(self, Pattern.compile(regex.toString()), closure);
      }
docs: Iterates through the given CharSequence line by line, splitting each line using
  the given regex delimiter.  The list of tokens for each line is then passed to
  the given closure.
  
  @param self    a CharSequence
  @param regex   the delimiting regular expression
  @param closure a closure
  @return the last value returned by the closure
  @throws java.io.IOException if an error occurs
  @throws java.util.regex.PatternSyntaxException if the regular expression's syntax is invalid
  @see #splitEachLine(CharSequence, java.util.regex.Pattern, groovy.lang.Closure)
  @since 1.8.2