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
Given a vector of regular expressions, I'd like to match all of then in a simultaneously obtaining an array of matches with capture groups.
use regex::RegexSet;let set = RegexSet::new(&[r"\w+",r"\d+",r"\pL+",r"foo",r"bar",r"barfoo",r"foobar",]).unwrap();// Iterate over and collect all of the matches.let matches:Vec<_> = set.matches_and_captures("foobar").into_iter().collect();assert_eq!(matches, vec![<Captures-0>,2,3,4,6]);
Where Captures-i represents an object with an index (or similar name) with value i and a captures (or similar name) value with an Option with captures for the regex at index i.
Of course, matches_and_captures is just an example of name for this feature at RegexSet.
Motivation
WASM and wasm-pack in addition to this feature would allow us to build a routing algorithm faster than find-my-way algorithm, the current Fastify routing algorithm, which is the fastest routing algorithm in the NodeJs ecosytem.
I'm open to contribute to this repo in order to achieve this feature and avoid unnecesary forks :)