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

Clarifies capturing properties of square brackets in regex #2286

Merged
merged 1 commit into from Aug 30, 2018

Conversation

MorayJ
Copy link
Contributor

@MorayJ MorayJ commented Aug 30, 2018

Also clarifies how round brackets work in name capture.

Also take the mystery out of what we are going to see in subrules.

The problem

named capture using non-capturing group confusion #1634

Also looked like a little further clarity could be added to the way brackets work for capturing.

Solution provided

Refer to 'default' of square brackets not capturing and then highlight that it is a change to default behaviour that they capture when named. Didn't want to use round brackets in the example as think it's advisable myself (though not imperative) to use square brackets in named groupings. Highlighted that you can use round brackets in the example though.

Added a line mentioning named regexes as this is what the subrules link goes on to talk about, but no harm mentioning it here.

Also clarifies how round brackets work in name capture.

Also take the mystery out of what we are going to see in subrules.
@MorayJ MorayJ merged commit 198f0ac into Raku:master Aug 30, 2018
@MorayJ MorayJ deleted the regex-clarity branch October 18, 2018 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants