Re: Need match character help

2018-05-17 Thread Norman Gaywood
Nice RE tutorial :-) /^ [ | <[d..z]-[g]> | g ]* $/ One question I have is what is the first | for? On Thu, 17 May 2018 at 21:10, Timo Paulssen wrote: > The description perhaps doesn't point out clearly enough: the reason why > the stuff inside the [ ] will match any amount of times is only the

perl6-debug-m Regex and Grammar Debugging

2018-05-17 Thread jeanpierre . carayol
Hi, I'm trying to use perl6-debug-m for doing Regex and Grammar Debugging. When I use Rakudo version 2016.10 , it's works fine. I get the behaviour which is described at https://perl6advent.wordpress.com/2012/12/05/a-perl-6-debugger/ in section "Regex and Grammar Debugging". I can easily see

Re: Need match character help

2018-05-17 Thread Timo Paulssen
The description perhaps doesn't point out clearly enough: the reason why the stuff inside the [ ] will match any amount of times is only the * at the end, the [ ] is only there because otherwise the regex would instead match something you didn't mean at all. If you're interested, read on for an exp

Re: Need match character help

2018-05-17 Thread Timo Paulssen
character classes are fundamentally the wrong thing for "phrases", since they describe only a character. Your current regex (before changing [gm] to ["gm"]) was expressing "from the start of the string, there's any amount of characters d through z (but neither g nor m) and then the end of the stri