Any way to get more information out of SetMatches? #805
-
When doing something like let re = Regex::new("[0-9]{3}-[0-9]{3}-[0-9]{4}").unwrap();
let mat = re.find("phone: 111-222-3333").unwrap();
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Have you checked the docs?
Correct.
See:
With all that said, I am anticipating expanding the API of In general, reporting match locations like this requires re-arranging how the match engines work. If you don't design the match engines in the first place to support it (as is the case for this crate), then adding it after-the-fact is difficult. And moreover, it has to be added to each engine. In the course of working on #656, I have or am about to finish re-writing every internal match engine. And in so doing, I made sure to design the implementation of each to work with multiple patterns from the start. In the end, |
Beta Was this translation helpful? Give feedback.
Have you checked the docs?
Correct.
See:
With all that said, I am anticipating expanding the API of
RegexSet
to permit it to report match locations. I haven't finished doing the experimentation work required to confirm it's possible, but I don't anticipate any roadblocks.In general, reporting match locations like this requires re-arranging how the match engines work. If you don't design the match engines in the first place to support it (as is the case for this crate), then ad…