Regex module

free_regex

procedureextensionSource

Releases everything compile allocated for the regex: the parsed pattern, both programs and the search tables. For a regex made by clone, that is its own search cache, and the pattern goes when the last regex sharing it is freed.

Example↗
Regex :: #import "Extensions/Regex";

re, ok := Regex.compile("a+b");
assert(ok && Regex.is_match(*re, "caab"));
Regex.free_regex(*re);
assert(re.engine == null);
free_regex :: (re: *Regex)

Parameters

re: *Regex

See also