Skip to content

Any way to get more information out of SetMatches? #805

Answered by BurntSushi
Wuelle asked this question in Q&A
Discussion options

You must be logged in to vote

Is there any way to get the same information when using a RegexSet?

Have you checked the docs?

As far as i can tell, when using RegexSet you can only tell if a expression matched the input, not where.

Correct.

Why is that?

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Wuelle
Comment options

Answer selected by Wuelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants