   
   :param: pattern regular expression pattern string
   :param: string  string to be searched
-  :param: flags   Array of NSRegularExpressionOptions objects
+  :param: flags   NSRegularExpressionOptions value
   
   :returns: Array of match results as MatchObject instances
   */
-  public static func finditer(pattern: String, _ string: String, flags: [RegexObject.Flag] = []) -> [MatchObject] {
+  public static func finditer(pattern: String, _ string: String, flags: RegexObject.Flag = []) -> [MatchObject] {
     return re.compile(pattern, flags: flags).finditer(string)
   }
   

  :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)
  }


  
  :param: pattern regular expression pattern string
  :param: string  string to be searched
  :param: flags   NSRegularExpressionOptions value
  
  :returns:   Corresponding MatchObject instance. Return nil if the string does not match the pattern or pattern is invalid; note that this is different from a zero-length match.
  */
  public static func match(pattern: String, _ string: String, flags: RegexObject.Flag = []) -> MatchObject? {
    return re.compile(pattern, flags: flags).match(string)
  }
  
