-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behaviour in matchall
#26049
Comments
AFAICT it works as documented, i.e. it returns As you note, the problem with returning captures is that there can be several of them, and it's going to be inefficient to return a vector of vectors. In that case, better use We could also deprecate |
Another issue to consider is the return type discrepancy between |
@sschelm that's a good point! |
Let's just deprecate it. We can add something else back later. |
See #26071. |
For example the code below returns the captured
()
SubString
with the rest of the expression rather than just the capture request.The expected behaviour should return:
Or maybe:
To account for multiple possible captures in each match.
I am currently using the
eachmatch
function as an alternative.The text was updated successfully, but these errors were encountered: