Skip to content

Is there a way to get the inside of capturing groups and to match multiple times? #816

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

You must be logged in to vote

It's difficult for me to help you here because I can't parse your question (there are multiple ways of interpreting it), and you don't say what output you want or what problem you're trying to solve.

So given that, I'll ask, have you looked at the documentation for capturing groups? It's in one of the first examples: https://docs.rs/regex/1.5.4/regex/#example-replacement-with-named-capture-groups

And there is more here: https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.captures and https://docs.rs/regex/1.5.4/regex/struct.Regex.html#method.captures_iter

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@VioletDarkKitty
Comment options

@BurntSushi
Comment options

Answer selected by BurntSushi
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