Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    \$\begingroup\$ To anyone looking at this who doesn't know Perl 6. [ and ] denote a non-capturing group in a regex, which would be written as (?: and ) in Perl 5. To get a character class you have to place them in angle brackets <[ and ]>. \$\endgroup\$ Commented Feb 12, 2016 at 17:06
  • \$\begingroup\$ b2gills++, I didn't even think to mention the differences in Perl 6 regexes \$\endgroup\$ Commented Feb 12, 2016 at 18:30
  • \$\begingroup\$ I have had a downvote because someone didn't know that, so I always point it out. \$\endgroup\$ Commented Feb 12, 2016 at 18:33
  • \$\begingroup\$ Is there a PP&CG rule stopping you from posting the more elegant golf as its own answer? I think a slightly longer* version would be worthy. *I hereby decree that elegant golf idioms include not caring about (not counting) whitespace. \$\endgroup\$ Commented Feb 13, 2016 at 19:27