(Go: >> BACK << -|- >> HOME <<)

Skip to content

Is it possible to get the number of required groups in a mixed required/optional regex? #1204

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

You must be logged in to vote

There's no out of the box way, no. I'm unsure of the use case for it. But it seems like you can compute it easily enough by looking at Hir recursively?

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@masklinn
Comment options

@BurntSushi
Comment options

@BurntSushi
Comment options

@masklinn
Comment options

@BurntSushi
Comment options

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