OxL Reference

method Captures.text

Text of group i.

Example:

oxl✓ checked in CI
fn main() io {
  let c = Regex.compile("(\\d+)-(\\d+)")!.captures("10-20")!
  print("{c.text(1)!} {c.text(2)!}")
}
Output
10 20
pub(api) fn text(i: usize) -> str?

Since. 1.0.0-beta

Parameters

NameType
iusize

Returns

str?

Effects

none declared (pure unless the body says otherwise)

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

See also