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

"Introduction to Perl 6 Regex" clarification on quantifier ( * vs + ) ? #9

Open
jubilatious1 opened this issue Sep 14, 2019 · 0 comments

Comments

@jubilatious1
Copy link

Hello, on the "Introduction to Perl 6 Regex" page the following statement is found:

/ 'foo.' * / # will match "foo.", "foo.foo.", "foo.foo.foo.", etc.

Doesn't the star (*) quantifier also match the empty string "" ?

Rather than adding the empty string to the text above, would a better example be a regex using the plus (+) quantifier, as below?

/ 'foo.' + / # will match "foo.", "foo.foo.", "foo.foo.foo.", etc.

Thank you.

Ref: https://github.com/perlpilot/perl6-docs/blob/master/intro/p6-regex-intro.pod

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

No branches or pull requests

1 participant