Hi All,

rakudo-pkg-2020.12-01.x86_64

Why does this work?

> $x = "1.33.222.4";
1.33.222.4
> $x ~~ m/ (<:N>+) [.] (<:N>+) [.] (<:N>+) [.] (<:N>+) /;
「1.33.222.4」
 0 => 「1」
 1 => 「33」
 2 => 「222」
 3 => 「4」



But this does not?
   --> Why the wrong number in $2?
   --> Why no Nil for $3?

> $x = "1.33.222";
1.33.222
> $x ~~ m/ (<:N>+) [.] (<:N>+) [.] (<:N>+) [.] (<:N>+) /;
「1.33.222」
 0 => 「1」
 1 => 「33」
 2 => 「2」
 3 => 「2」


Yours in confusion,
-T

Reply via email to