pub fn build(self) -> Result<Grep> {
        let expr = try!(self.parse());
        let literals = LiteralSets::create(&expr);
        let re = try!(self.regex(&expr));
        let required = match literals.to_regex_builder() {
            Some(builder) => Some(try!(self.regex_build(builder))),
            None => {
                match strip_unicode_word_boundaries(&expr) {
                    None => None,
                    Some(expr) => {
                        debug!("Stripped Unicode word boundaries. \
                                New AST:\n{:?}", expr);
                        self.regex(&expr).ok()
                    }
                }
            }
        };
        Ok(Grep {
            re: re,
            required: required,
            opts: self.opts,
        })
    }
/// Create a line searcher.
///
/// If there was a problem parsing or compiling the regex with the given
/// options, then an error is returned.
Create a line searcher.
If there was a problem parsing or compiling the regex with the given
options, then an error is returned.
Create a line searcher . If there was a problem parsing or compiling the regex with the given options then an error is returned .
pub fn build(self) -> Result<Grep> {
        let expr = try!(self.parse());
        let literals = LiteralSets::create(&expr);
        let re = try!(self.regex(&expr));
        let required = match literals.to_regex_builder() {
            Some(builder) => Some(try!(self.regex_build(builder))),
            None => {
                match strip_unicode_word_boundaries(&expr) {
                    None => None,
                    Some(expr) => {
                        debug!("Stripped Unicode word boundaries. \
                                New AST:\n{:?}", expr);
                        self.regex(&expr).ok()
                    }
                }
            }
        };
        Ok(Grep {
            re: re,
            required: required,
            opts: self.opts,
        })
    }
pub fn build ( self ) -> Result < Grep > { let expr = try ! ( self parse ( ) ) ; let literals = LiteralSets :: create ( & expr ) ; let re = try ! ( self regex ( expr ) ) ; let required = match literals . to_regex_builder ( ) { Some ( builder ) => Some ( try ! ( self regex_build ( builder ) ) ) , None => { match strip_unicode_word_boundaries ( & expr ) { None => None , Some ( expr ) => { debug ! ( " \
 \n " expr ) ; self . regex ( & expr ) . ok ( ) } } } } ; Ok ( Grep { re : re , required : required , opts : self . opts , } ) }
Create a line searcher.
Create a line searcher .
self