A regex compiled while your program compiles: a type, made from a constant pattern.
Regex :: #import "Extensions/Regex";
Date :: Regex.Static("(?<year>[0-9]{4})-(?<month>[0-9]{2})-(?<day>[0-9]{2})");
date, ok := Regex.parse(Date, "2026-10-11"); // a Date.Groups: date.year is a u16
assert(ok && date.year == 2026 && date.month == 10 && date.day == 11);A bad pattern is a compile error, and the automata are built at compile time (big Unicode
classes excepted: those are built on first use), so searching needs no setup. The procedures
below take it in place of *re; parse, parse_into and captures_into only take one of
these. For a pattern known only at run time, use compile.