pub fn new(pattern: &str, replacement: &str) -> Result<Self, Box<dyn Error>> {
        Ok(Self(
            Regex::new(&pattern)?,
            replacement.to_string(),
        ))
    }
/// Create a new filter rule with a pattern and a replacement text.
/// The pattern follows the syntax from the [`regex`](https://docs.rs/regex/1) crate.
/// Returns an error if the regex could not be compiled.
Create a new filter rule with a pattern and a replacement text.
The pattern follows the syntax from the [`regex`] crate.
Returns an error if the regex could not be compiled.
Create a new filter rule with a pattern and a replacement text . The pattern follows the syntax from the [ ` regex ` ] crate . Returns an error if the regex could not be compiled .
pub fn new(pattern: &str, replacement: &str) -> Result<Self, Box<dyn Error>> {
        Ok(Self(
            Regex::new(&pattern)?,
            replacement.to_string(),
        ))
    }
pub fn new ( pattern : & str , replacement : & str ) -> Result < Self , Box < dyn Error > > { Ok ( Self ( Regex :: new ( & pattern ) ? , replacement . to_string ( ) , ) ) }
Create a new filter rule with a pattern and a replacement text.
Create a new filter rule with a pattern and a replacement text .
pattern
&str
replacement
&str
pattern
&str
replacement
&str