OxL Справочник OxL
РусскийEnglish

method Regex.capturesAll

Every match with its groups.

Example:

oxl✓ проверяется в 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)!}")
  }
}
Вывод
a -> 1
b -> 2
pub(api) fn capturesAll(s: str) -> List<Captures>

Сложность. O(n) in the length of the text.

С версии. 1.0.0-beta

Параметры

ИмяТип
sstr

Возвращает

List<Captures>

Эффекты

не объявлены (чистая, пока тело не говорит иное)

Определено в: std/core/text.oxl:1354

См. также