Re: regex: how to I pick out items in the middle?

2022-10-30 Thread ToddAndMargo via perl6-users
On 10/30/22 01:24, Elizabeth Mattijsen wrote: Which brings me back to the other of my criticisms of the documentation. The examples are high level users showing off their skills making for a totally useless example for beginners. They should show a simple example and then work up to the show

Re: regex: how to I pick out items in the middle?

2022-10-30 Thread ToddAndMargo via perl6-users
On 10/29/22 19:16, William Michels via perl6-users wrote: In the Raku REPL: $ raku Welcome to Rakudo™ v2022.07. Implementing the Raku® Programming Language v6.d. Built on MoarVM version 2022.07. To exit type 'exit' or '^D' [0] > #beginning Nil [1] > my Str $y="xx"; S/^ x ** 2 /QQ/.say

Re: regex: how to I pick out items in the middle?

2022-10-30 Thread Elizabeth Mattijsen
> Which brings me back to the other of my criticisms > of the documentation. The examples are high level > users showing off their skills making for a totally > useless example for beginners. They should show a > simple example and then work up to the show off stuff. On that note, OOC, what

Re: regex: how to I pick out items in the middle?

2022-10-30 Thread ToddAndMargo via perl6-users
<mailto:perl6-users@perl.org <mailto:perl6-users@perl.org>>> wrote: >> >>     Hi All, >> >>     With a regex, how do I pick out items in the middle of the string?  Two >>     from the beginning or two from the end? >&g

Re: regex: how to I pick out items in the middle?

2022-10-29 Thread William Michels via perl6-users
On Sat, Oct 29, 2022 at 7:29 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: > >> On Sat, Oct 29, 2022 at 6:46 PM ToddAndMargo via perl6-users > >> mailto:perl6-users@perl.org>> wrote: > >> > >> Hi All, > >> >

Re: regex: how to I pick out items in the middle?

2022-10-29 Thread ToddAndMargo via perl6-users
On Sat, Oct 29, 2022 at 6:46 PM ToddAndMargo via perl6-users mailto:perl6-users@perl.org>> wrote: Hi All, With a regex, how do I pick out items in the middle of the string? Two from the beginning or two from the end? 4] > my Str $y="xx"; $y ~~ s/ $([.

Re: regex: how to I pick out items in the middle?

2022-10-29 Thread William Michels via perl6-users
my Str $y="xx"; S/^ [x ** 2] <(x ** 2)> /QQ/.say given $y; xxQQxx [2] > #end Nil [3] > my Str $y="xx"; S/ x ** 2 $/QQ/.say given $y; QQ HTH, Bill. On Sat, Oct 29, 2022 at 6:46 PM ToddAndMargo via perl6-users < perl6-users@perl.org> wrote: >

regex: how to I pick out items in the middle?

2022-10-29 Thread ToddAndMargo via perl6-users
Hi All, With a regex, how do I pick out items in the middle of the string? Two from the beginning or two from the end? 4] > my Str $y="xx"; $y ~~ s/ $([.*-2]) "x"/Q/; print $y ~ "\n" ===SORRY!=== Error while compiling: Malformed postfix call --