This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
drudgesentinel Thanks Rog, I was able to proof of concept what i was trying to do via my $date-format = rx/ $<year> = \d ** 4 '-' $<month> = \d ** 2 '-' $<day> = \d ** 2 /; sub get-date($text) { if $text ~~ $date-format { say $/<year> }; } get-date($test-data); 00:06
Appreciate the help
switching from my regex to rx/ was pivotal, I'm not sure why but I'm glad it's working for the sake of me parsing these logs in any case (: 00:07
roguerakudev ah, if you're doing it like that now you can omit the / in $/<year> I believe 00:15
why it doesn't work with my regex is beyond me honestly 00:16
02:26 tea3po joined 02:29 teatwo left 04:05 kjp left 04:08 kjp joined, kjp left, kjp joined
_elcaro_ Consider using <[0..9]> instead of \d... unless you consider 1૬3𝟞-႐٨-᧔𞥕 a valid date. 04:55
(or if you know all your input is within the ASCII range, you're probably ok) 04:56
drudgesentinel For my very simple use case I know what the input will be but I appreciate the additional consideration. There's a word case for this too isn't there? <number> or something 05:14
nemokosch I wonder what it means that it doesn't work with my regex 06:33
08:11 dakkar joined 11:52 guifa left 11:53 guifa joined 13:33 ab5tract joined 14:25 tea3po left 14:26 tea3po joined 16:36 dakkar left 16:54 ab5tract left 20:15 snonux left, snonux joined 22:18 kiranraku joined
kiranraku Hello, is it possible to declare the size of an array in the function return value signature? E.g. —> array[uint32] but let’s say restrict to 10 elements? 22:21
22:25 kiranraku78 joined, kiranraku left 22:39 kiranraku78 left 22:40 kiranraku joined 22:46 kiranraku left 22:49 kiranraku joined 22:53 kiranraku left 23:03 CIAvash joined