Re: Is there another way to define a regex?

2016-01-18 Thread Nelo Onyiah
Curious but are the non capturing groups necessary? On 17 Jan 2016 11:35 p.m., "Tom Browder" wrote: > On Sun, Jan 17, 2016 at 3:03 PM, Moritz Lenz wrote: > > On 01/17/2016 06:07 PM, Tom Browder wrote: > ... > >> # regex of dirs to ignore > >> my regex

Re: Is there another way to define a regex?

2016-01-18 Thread Gianni Ceccarelli
On 2016-01-17 Tom Browder wrote: > My question: Is there a way to have Perl 6 do the required escaping > for the regex programmatically, i.e., turn this: > > my $str = '/home/usr/.cpan'; > > into this: > > my regex dirs { > \/home\/usr\/\.cpan > } > > automatically?

Re: Is there another way to define a regex?

2016-01-17 Thread Bruce Gray
On Jan 17, 2016, at 11:07 AM, Tom Browder wrote: > I'm trying to write all new Perl code in Perl 6. One thing I need is > the equivalent of the Perl 5 qr// and, following Perl 6 docs, I've > come to use something like this (I'm trying to ignore certain > directories): >

Re: Is there another way to define a regex?

2016-01-17 Thread Tom Browder
On Sun, Jan 17, 2016 at 1:55 PM, Bruce Gray wrote: > On Jan 17, 2016, at 11:07 AM, Tom Browder wrote: > >> I'm trying to write all new Perl code in Perl 6. One thing I need is >> the equivalent of the Perl 5 qr// and, following Perl 6 docs, I've ...

Re: Is there another way to define a regex?

2016-01-17 Thread Tom Browder
On Sun, Jan 17, 2016 at 3:03 PM, Moritz Lenz wrote: > On 01/17/2016 06:07 PM, Tom Browder wrote: ... >> # regex of dirs to ignore >> my regex dirs { >> \/home\/user\/\.cpan | >> \/home\/tbrowde\/\.emacs >> } > > Better written as > > my regex dirs { >|

Is there another way to define a regex?

2016-01-17 Thread Tom Browder
I'm trying to write all new Perl code in Perl 6. One thing I need is the equivalent of the Perl 5 qr// and, following Perl 6 docs, I've come to use something like this (I'm trying to ignore certain directories): # regex of dirs to ignore my regex dirs { \/home\/user\/\.cpan |