The regex module provides an implementation of regular expressions which adheres
closely to the POSIX Extended Regular Expressions (ERE) specification.

See https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04

This module refers to a regular expression "match" as a [[result]]. The POSIX
match disambiguation rules are used; the longest of the leftmost matches is
returned. This implementation computes matches in linear time.

	const re = regex::compile(`[H|h]ar(e|riet)`)!;
	defer regex::finish(&re);

	assert(regex::test(&re, "Let's all love Harriet and hare"));

	// {"Harriet", "riet"}
	const result = regex::find(&re, "Let's all love Harriet and hare");
	defer regex::result_free(result);

	// {{"Harriet", "riet"}, {"hare", "e"}}
	const results = regex::findall(&re, "Let's all love Harriet and hare");
	defer regex::result_freeall(results);
