Function broot::pattern::build_regex

source ·
pub fn build_regex(pat: &str, flags: &str) -> Result<Regex, PatternError>
Examples found in repository?
src/pattern/regex_pattern.rs (line 26)
24
25
26
27
28
29
    pub fn from(pat: &str, flags: &str) -> Result<Self, PatternError> {
        Ok(RegexPattern {
            rex: super::build_regex(pat, flags)?,
            flags: flags.to_string(),
        })
    }
More examples
Hide additional examples
src/pattern/content_regex_pattern.rs (line 34)
32
33
34
35
36
37
38
    pub fn new(pat: &str, flags: &str, max_file_size: usize) -> Result<Self, PatternError> {
        Ok(Self {
            rex: super::build_regex(pat, flags)?,
            flags: flags.to_string(),
            max_file_size,
        })
    }