You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expectation with scenario 1 is that the remaining to parse string does not container either of the / as they should be consumed by the outer group.
use nom::error::ErrorKind;use nom_regex::str::re_captures;fnmain(){println!("{}","Broken / still in remaining to parse");let re = regex::Regex::new(r"^([/](.+)[/])").unwrap();let parser = re_captures::<(&str,ErrorKind)>(re);println!("{:?}", parser("/pr[]-/ && abc"));println!("{}","Works but needs post processing");let re = regex::Regex::new(r"^([/].+[/])").unwrap();let parser = re_captures::<(&str,ErrorKind)>(re);println!("{:?}", parser("/pr[]-/ && abc"));println!("{}","/ still in remaining to parse");let re = regex::Regex::new(r"^[/](.+)[/]").unwrap();let parser = re_captures::<(&str,ErrorKind)>(re);println!("{:?}", parser("/pr[]-/ && abc"));}
Expectation with scenario 1 is that the remaining to parse string does not container either of the
/
as they should be consumed by the outer group.repl.it https://replit.com/@merc1031/IllAttentiveDrivers#src/main.rs
The text was updated successfully, but these errors were encountered: