OxL Reference

method Captures.get

Group i (0 = whole match).

Example:

oxl✓ checked in CI
fn main() io {
  let c = Regex.compile("a(x)?(b)")!.captures("ab")!
  print("{c.get(1)} {c.get(2)!.text} {c.get(9)}")
}
Output
none b none
pub(api) fn get(i: usize) -> Match?

Since. 1.0.0-beta

Parameters

NameType
iusize

Returns

Match?

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/text.oxl:1170

See also