/// return true if the string is matched by #pat, otherwise return false.
/// return an error if #pat is invalid.
val is_match: fn(#pat: string, s: string) -> Result<bool, `ReError(string)>;
/// return an array of instances of #pat in s. return an error if #pat is
/// invalid.
val find: fn(#pat: string, s: string) -> Result<Array<string>, `ReError(string)>;
/// return an array with an element per match of #pat, each an array of the whole match
/// followed by each capture group, null for a group that did not take part: re::captures(
/// #pat: r"(\d)(x)?", "1 2x") is [["1", "1", null], ["2x", "2", "x"]]. Return an error if
/// #pat is invalid.
val captures: fn(#pat: string, s: string) -> Result<Array<Array<Option<string>>>, `ReError(string)>;
/// return an array of strings split by #pat. return an error if #pat is invalid.
val split: fn(#pat: string, s: string) -> Result<Array<string>, `ReError(string)>;
/// split the string by #pat into at most #limit parts, the last holding the rest.
/// return an error if #pat is invalid or #limit is not positive
val splitn: fn(#pat: string, #limit: i64, s: string) -> Result<Array<string>, `ReError(string)>;