Function sedregex::find_and_replace[][src]

pub fn find_and_replace<I>(
    text: &str,
    commands: I
) -> Result<Cow<'_, str>, ErrorKind> where
    I: IntoIterator,
    I::Item: AsRef<str>, 
Expand description

Parses and executes regex replace commands in a form of s/regex/replace/flags.

Usage notes

  • Delimiter slashes (/) could be escaped by a backslash: \/
  • For the list of supported commands please refer to the Command enum
  • For the list of supported flags please refer to the RegexFlag enum
  • If multiple commands are given they are executed one after another on a result produced by a previous command.

For examples please see the crate’s main documentation page.