✓
Passing This code compiles and runs correctly.
Code
// scan, groupless: extract every run of digits as an effect stream. No named
// groups — the `!` branch carries the matched text span (the predicate/text path,
// complementing 640_011's named-group destructure). Leftmost-longest: "12" and
// "345", not single digits.
import std/io
import std/regex
std/regex:scan(input: "a12b345c")
! `[0-9]+` n |> std/io:print.ln("n={{ n:s }}")
| done |> std/io:print.ln("done")
Actual
n=12
n=345
done
Expected output
n=12
n=345
done
Flows
flow ~scan click a branch to expand · @labels scroll to their anchor
scan (input: "a12b345c")
Test Configuration
MUST_RUN