Skip to content

replace_all

In std/regex.

fn replace_all(text: String, pattern: String, replacement: String) : String

text with every match of pattern replaced by replacement, in which $1 is the first group: "a1b22c" | regex.replace_all("([0-9]+)", "<$1>") is "a<1>b<22>c".