Skip to main content

str_replace_regex

Function str_replace_regex 

Source
pub fn str_replace_regex(
    s: &str,
    re_val: &Value,
    repl: &Value,
    all: bool,
) -> Result<Value, String>
Expand description

str.replace(re, repl) / str.replaceAll(re, repl). repl is either a string (with $1/$&/$`/$'/$<name>/$$ patterns) or a function replacer.