Struct sedregex::ReplaceCommand [−][src]
pub struct ReplaceCommand<'a> { /* fields omitted */ }
Expand description
A replace command, ready to be applied on your text.
let cmd = ReplaceCommand::new("s/world/世界/i").unwrap();
assert_eq!("Hello, 世界!", cmd.execute("Hello, world!"));
assert_eq!("The 世界 is a cruel place", cmd.execute("The world is a cruel place"));
Implementations
Parses the given command in a form of s/<expr>/<replace>/<flags>
and builds a regular
expression.