my @images = map { [ $_ =~ m/(\w+\.jpg)/gi ] } split /\|/, $str;