← All generated programs

regex-v1seed 43

regex-00000043.raku

Edit the generated case and press Run. It executes locally in your browser using Raku++.

my @matches = "one 22 three".match(/ <[a..z]>+ /, :g);
my $value = @matches.map({ ($_.Str, $_.from, $_.to) }).Array;

sub safe-str($v) {
    my $s = try $v.Str;
    $s.defined ?? $s !! '<undefined>'
}

say "TYPE\t" ~ $value.^name;
say "RAKU\t" ~ $value.raku;
say "STR\t" ~ safe-str($value);
say "BOOL\t" ~ $value.Bool;