Like captures, into your own struct (see parse_into).
Regex :: #import "Extensions/Regex";
Time :: Regex.Static("(?<hour>[0-9]{2}):(?<minute>[0-9]{2})");
Clock :: struct { hour: int; minute: int; }
clock: Clock;
assert(Regex.captures_into(Time, "meet at 09:30", *clock));
assert(clock.minute == 30);captures_into :: ($R: Type, text: string, out: *$T, start := 0) -> bool
Parameters
- $R: Type
- text: string
- out: *$T
- start := 0
Returns
- bool