Skip to content
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

regexp: Named captures should appear in a hashmap #32881

Closed
mcandre opened this issue Jul 1, 2019 · 3 comments
Closed

regexp: Named captures should appear in a hashmap #32881

mcandre opened this issue Jul 1, 2019 · 3 comments

Comments

@mcandre
Copy link

mcandre commented Jul 1, 2019

The regexp API expects users to perform dangerous index arithmetic between two different arrays, defeating the purpose of naming capture groups. Let's provide a standard method for retrieving capture groups from regexp results in the form of hashmaps, using the names specified in the regular expression.

@cespare
Copy link
Contributor

cespare commented Jul 1, 2019

See #32420.

@bcmills
Copy link
Contributor

bcmills commented Jul 1, 2019

If you want to propose a specific API, please propose a specific API (with details and examples and so on).

In the meantime, #32420 is a concrete proposal that aims to address what I believe is the same underlying problem.

@bcmills
Copy link
Contributor

bcmills commented Jul 1, 2019

Duplicate of #32420

@bcmills bcmills marked this as a duplicate of #32420 Jul 1, 2019
@bcmills bcmills closed this as completed Jul 1, 2019
@golang golang locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants