This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
00:43 habere-et-disper joined 00:58 ACfromTX joined 00:59 ACfromTX is now known as atcroft 01:24 habere-et-disper left 01:28 disbot8 joined 01:31 disbot7 left 01:32 snonux left 01:33 snonux joined 02:06 atcroft left 02:07 human-blip left 02:08 human-blip joined 06:50 ACfromTX joined, ACfromTX is now known as atcroft 09:21 habere-et-disper joined 11:02 habere-et-disper left 14:56 jgaz joined
jgaz Can't seem to match any non-whitespace that recurs twice in a row, as in `/(\S)\1/` in Perl regex. Tried `/ (\S) ** 2 /` and similar; no luck. Any ideas? 15:06
lizmat m: say " a bc def" ~~ / \S ** 2 / 15:12
camelia 「bc」
jgaz lizmat, not quite, think Mississippi being matched, because any two identical letters occur twice. 15:17
disbot8 <shimmerfairy> We've got the <same> rule for checking if a character is the same on either side of the current position. 15:23
<shimmerfairy> m: say "Mississippi" ~~ m:g/\S <.same> \S/
<Raku eval> (「ss」 「ss」 「pp」)
jgaz Oooh! That's cool. Thanks. 15:32
shimmerfairy, confirmed, that works. 15:34
disbot8 <shimmerfairy> Glad to hear it. Incidentally, if you really need to match a previously-matched substring, there are ways to do it, with a bit of effort. 15:40
16:57 habere-et-disper joined 17:22 habere-et-disper left
disbot8 <antononcube> @jgaz More in the spirit of your Perl code is this: say "Mississippi" ~~ m:g/ ($<c>=\S $<c>+) /; 17:33
<antononcube> m: say "Mississippi" ~~ m:g/ ($<c>=\S $<c>+) / 17:34
<Raku eval> (「ss」 0 => 「ss」 c => 「s」 「ss」 0 => 「ss」 c => 「s」 「pp」 0 => 「pp」 c => 「p」)
17:50 atcroft left 17:59 kjp_ joined 18:00 kjp left, jgaz left 18:01 jgaz joined 18:17 ACfromTX joined, ACfromTX is now known as atcroft 22:20 jgaz left