pub fn regex_with_refs(&self, region: &Region, text: &str) -> Regex {
        let new_regex = substitute_backrefs_in_regex(self.regex.regex_str(), |i| {
            region.pos(i).map(|(start, end)| escape(&text[start..end]))
        });

        return Regex::new(new_regex);
    }
/// Used by the parser to compile a regex which needs to reference
/// regions from another matched pattern.
Used by the parser to compile a regex which needs to reference
regions from another matched pattern.
Used by the parser to compile a regex which needs to reference regions from another matched pattern .
pub fn regex_with_refs(&self, region: &Region, text: &str) -> Regex {
        let new_regex = substitute_backrefs_in_regex(self.regex.regex_str(), |i| {
            region.pos(i).map(|(start, end)| escape(&text[start..end]))
        });
        return Regex::new(new_regex);
    }
pub fn regex_with_refs ( & self , region : & Region , text : & str ) -> Regex { let new_regex = substitute_backrefs_in_regex ( self . regex . regex_str ( ) , | i | { region . pos ( i ) . map ( | ( start , end ) | escape ( & text [ start .. end ] ) ) } ) ; return Regex :: new ( new_regex ) ; }
Used by the parser to compile a regex which needs to reference
regions from another matched pattern.
Used by the parser to compile a regex which needs to reference regions from another matched pattern .
&self
region
&Region
text
&str
&self
region
&Region
text
&str