pub fn reg_replace(
src: &str,
match_pattern: &str,
rep: &str,
global: bool,
multiline: bool,
) -> StringExpand description
Replaces matches of a pattern with a replacement string
§Arguments
src- The source stringmatch_pattern- The pattern to matchrep- The replacement stringglobal- Whether to replace all occurrences or just the first onemultiline- Whether to enable multiline mode
§Returns
The string with replacements made