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

Match.groups() should return all groups #17643

Closed
DartBot opened this issue Mar 19, 2014 · 3 comments
Closed

Match.groups() should return all groups #17643

DartBot opened this issue Mar 19, 2014 · 3 comments
Labels
area-library closed-duplicate Closed in favor of an existing report library-core type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Mar 19, 2014

This issue was originally filed by @jooadam


I’m suprised that there is no direct way to ask for all the capture groups’ content in a Match object.

Currently, String Match.group(int group) returns the contents of the designated group, while List<String> Match.groups(List<int> groupIndices) returns a list of the contents of the groups given as argument to the method. There is, however, no straightforward way to get the contents of all the groups: omitting the arguments does not check, an empty list yields an empty list, null throws an exception.

One is left with match.groups(new List.generate(match.groupCount, (i) => i + 1)), which is ridiculous.

@sgjesse
Copy link
Contributor

sgjesse commented Mar 20, 2014

Added Area-Library, Triaged labels.

@lrhn
Copy link
Member

lrhn commented Mar 20, 2014

Removed Type-Defect label.
Added Type-Enhancement, Library-Core labels.

@floitschG
Copy link
Contributor

Duplicate of #6622

@floitschG floitschG marked this as a duplicate of #6622 Sep 11, 2017
@floitschG floitschG added closed-duplicate Closed in favor of an existing report and removed core-m labels Sep 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-library closed-duplicate Closed in favor of an existing report library-core type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

5 participants