         splitsLeft--
         start = advance(end, length)
       }
-      if start >= end {
+      if start <= string.endIndex {
         results.append(string.substringWithRange(start..<string.endIndex))
       }
       return results

          end = string.endIndex
          length = 0
        }
        results.append(string.substringWithRange(start..<end))
        if regex.numberOfCaptureGroups > 0 {
          results.extend(MatchObject(string: string, match: result).groups())

  }

  /**
  Return all non-overlapping matches of pattern in string, as a list of strings. The string is scanned left-to-right, and matches are returned in the order found. Empty matches are included in the result unless they touch the beginning of another match.
  
  See https://docs.python.org/2/library/re.html#re.findall
  
