Skip to content

Instantly share code, notes, and snippets.


rust-play/ Secret

Created Apr 21, 2021
What would you like to do?
Code shared from the Rust Playground
fn main() {
let regex = regex::Regex::new(r"(?P<a_only>a$)|(?:a:)(?P<a_colon>[^/].+)|(?P<a_slash>a/\d{1,2})").unwrap();
.map(|string| regex.captures(string))
.for_each(|cap| println!("{:?}", cap))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment