my @list = (1..5); my $pattern = qr/\d+(??{if($& < 3) { "" } else { "(?