Function combine::parser::regex::match_ [−][src]
pub fn match_<R, Input>(regex: R) -> Match<R, Input> where
R: Regex<Input::Range>,
Input: RangeStream,
This is supported on crate feature
regex
only.Expand description
Matches regex
on the input returning the entire input if it matches.
Never consumes any input.
extern crate regex; extern crate combine; use regex::Regex; use combine::Parser; use combine::parser::regex::match_; fn main() { let regex = Regex::new("[:alpha:]+").unwrap(); assert_eq!( match_(®ex).parse("abc123"), Ok(("abc123", "abc123")) ); }