How do I test a line of text against multiple regexes in #Rust and print out the captured groups?
-
-
Replying to @PetrusTheron
I’m a fan of
@burntsushi5’s regex work even though I am not a rust dev. So I believe he wrote something called regexset. Not sure if it will do capture groups.1 reply 0 retweets 0 likes
Replying to @keegan_csmith @PetrusTheron
This is RegexSet: https://docs.rs/regex/1.0.6/regex/struct.RegexSet.html … --- It does not support capture groups itself. Instead, you can use a RegexSet to determine which regex matched, and then extract capture groups with a separate regex. You should only do this if you can't get a normal alternation to work.
11:07 AM - 19 Nov 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.