Re: Fwd: Working with a regex using positional captures stored in a variableperl6-us...@perl.org

2021-03-11 Thread Moritz Lenz
Hi there, On 11.03.21 17:43, William Michels wrote: > Hi Moritz your book is mentioned below. Care to chime in? Reply to > perl6-users . > > Thx, Bill. > W. Michels, Ph.D. > > -- Forwarded message - > From: Joseph Brenner > Date: Thu, Mar 11, 2021 at 12:28 AM > Subject:

Re: A problem case for the site documentation search: the "^methods" method.

2021-03-11 Thread Richard Hainsworth
Jo, For what its worth, the search page on http://raku.finanalyst.org now takes you to ^methods Previously, a search on '^methods' found the reference, but hide the location, so the link could not be clicked. That is fixed now. Regards, Richard On 10/03/2021 15:42, Joseph Brenner wrote:

"rule" declarator: Different results for 'unadorned' match vs unnamed/named captures? (in re Grammars...).

2021-03-11 Thread William Michels via perl6-users
Hello, I've been chatting with raiph on SO regarding Grammar "tokens" vs "rules". The OP is here https://stackoverflow.com/q/62051742 and our discussion is here https://stackoverflow.com/a/62053666 . I think there's something going on with the examples below, as I'm seeing different results when

The SF Perl Raku Study Group, 03/14 at 1pm PDT

2021-03-11 Thread Joseph Brenner
Donald Knuth, "Computer programming as an art", CACM, December 1974: "In this connection it is most important for us all to remember that there is no one 'best' style; everybody has his own preferences, and it is a mistake to try to force people into an unnatural mold. ... The important thing

Re: Working with a regex using positional captures stored in a variable

2021-03-11 Thread Brad Gilbert
If you interpolate a regex, it is a sub regex. If you have something like a sigil, then the match data structure gets thrown away. You can put it back in as a named > $input ~~ / 「9 million」 pattern => 「9 million」 0 => 「9」 1 => 「million」 Or as a numbered: >

Working with a regex using positional captures stored in a variable

2021-03-11 Thread Joseph Brenner
Does this behavior make sense to anyone? When you've got a regex with captures in it, the captures don't work if the regex is stashed in a variable and then interpolated into a regex. Do capture groups need to be defined at the top level where the regex is used? { # From a code example in the