Is there a builtin way in regex to get the "depth" of a capture ? #1239
Answered
by
BurntSushi
NovaliX-Dev
asked this question in
Q&A
-
By depth i mean by how many other captures a specific one is surrounded. For example :
Is this a feature already implemented in regex ? Or should i make a feature request for it ? |
Beta Was this translation helpful? Give feedback.
Answered by
BurntSushi
Nov 13, 2024
Replies: 1 comment
-
You can do it manually by getting an I don't see a reason to provide anything more convenient in the API. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BurntSushi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can do it manually by getting an
Hir
fromregex-syntax
and computing the depth yourself.I don't see a reason to provide anything more convenient in the API.