in reply to Re: Re^5: Capturing everything after an optional character in a regex?
in thread Capturing everything after an optional character in a regex?

Yes, in Perl 6, /x is on by default. It also has better support for named captures, so the example above can be expressed fine without the comments showing which numbered variable goes with which capture.

----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer

: () { :|:& };:

Note: All code is untested, unless otherwise stated