replaceWithFunction
Replace all matches of a pattern using a function to compute the replacement.
string(required): the source stringpattern(required): regex patternfn(required): lambda(match) -> replacement
utlx
replaceWithFunction("hello world", "[a-z]+", (m) -> upper(m))
// "HELLO WORLD"