OxL Reference

method Regex.capturesAll

Every match with its groups.

Example:

oxl✓ checked in CI
fn main() io {
  let re = Regex.compile("(\\w+)=(\\w+)")!
  for c in re.capturesAll("a=1 b=2") {
    print("{c.text(1)!} -> {c.text(2)!}")
  }
}
Output
a -> 1
b -> 2
pub(api) fn capturesAll(s: str) -> List<Captures>

Complexity. O(n) in the length of the text.

Since. 1.0.0-beta

Parameters

NameType
sstr

Returns

List<Captures>

Effects

none declared (pure unless the body says otherwise)

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

See also