       var results = [String?]()
       var start = string.startIndex
       var end = string.startIndex
-      regex.enumerateMatchesInString(string, options: defaultMatchingOptions, range: range) { result, _, stop in
+      regex.enumerateMatchesInString(string, options: [], range: range) { result, _, stop in
         if splitsLeft <= 0 {
           stop.memory = true
           return

  :param: pattern  regular expression pattern string
  :param: string   string to be splitted
  :param: maxsplit maximum number of times to split the string, defaults to 0, meaning no limit is applied
  :param: flags    Array of NSRegularExpressionOptions objects
  
  :returns: Array of splitted strings
  */
  public static func split(pattern: String, _ string: String, _ maxsplit: Int = 0, flags: [RegexObject.Flag] = []) -> [String?] {
    return re.compile(pattern, flags: flags).split(string, maxsplit)
  }


      let maxCount = count == 0 ? Int.max : (count > 0 ? count : 0)
      var n = 0
      var offset = 0
      regex.enumerateMatchesInString(string, options: [], range: range) { result, _, stop in
        if maxCount <= n {
          stop.memory = true
          return
