Re: Regex surprises

2022-09-15 Thread Daniel Sockwell
Sean, To follow up on what Brian said, you can also do the same thing on a single line with named captures https://docs.raku.org/language/regexes#Named_captures (This often isn't as good as Brian's method, since breaking things up as Brian showed often helps readability. But it can be a good o

Re: Regex surprises

2022-09-13 Thread Brian Duggan
> > > ... > > > "y" ~~ /(x)|(y)/ I would probably take advantage of the composability of Raku regexes, and do something like my regex x { x } my regex y { y } and then use / | / and check for $ or $ > > S:g[(x)|(y)] = $0 ?? x-replacement !! y-replacement e.g. this becomes S:g[|] = $

Re: Regex surprises

2022-09-12 Thread Brad Gilbert
Raku removed all of the regex cruft that has accumulated over the years. (Much of that cruft was added by Perl.) I'm not going to respond to the first part of your email, as I think it is an implementation artifact. On Mon, Sep 12, 2022 at 3:06 PM Sean McAfee wrote: > Hello-- > > I stumbled acr