fn parse_regex_value(matches: &ArgMatches, key: &str) -> Regex {
    let pattern = matches.value_of(key).unwrap();
    match Regex::new(pattern) {
        Ok(re) => re,
        Err(e) => {
            eprintln!("{}", e); // The provided messages are actually really good.
            std::process::exit(1);
        }
    }
}
// Parses a regex value; expects taht the key is present and has a value.
Parses a regex value; expects taht the key is present and has a value.
Parses a regex value ; expects taht the key is present and has a value .
fn parse_regex_value(matches: &ArgMatches, key: &str) -> Regex {
    let pattern = matches.value_of(key).unwrap();
    match Regex::new(pattern) {
        Ok(re) => re,
        Err(e) => {
            eprintln!("{}", e); // The provided messages are actually really good.
            std::process::exit(1);
        }
    }
}
fn parse_regex_value ( matches : & ArgMatches , key : & str ) -> Regex { let pattern = matches . value_of ( key ) . unwrap ( ) ; match Regex :: new ( pattern ) { Ok ( re ) => re , Err ( e ) => { eprintln ! ( " " e ) ; // The provided messages are actually really good. std :: process :: exit ( 1 ) ; } } }
Parses a regex value; expects taht the key is present and has a value.
Parses a regex value ; expects taht the key is present and has a value .
matches
&ArgMatches
key
&str
matches
&ArgMatches
key
&str