perl6-docs
perl6-docs copied to clipboard
"Introduction to Perl 6 Regex" clarification on quantifier ( * vs + ) ?
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