Compiles pattern. The result says whether it was valid and, if not, the error says where it went wrong. Free the regex with free_regex.
- pattern: the regular expression.
- options: flags such as case-insensitive matching.
compile :: (
pattern: string,
options := Options.{}
) -> (Regex, ok: bool, Error)
Compiles pattern. The result says whether it was valid and, if not, the error says where it went wrong. Free the regex with free_regex.
Parameters
- pattern: string
- the regular expression.
- options := Options.{}
- flags such as case-insensitive matching.
Returns
- ok: bool