if ($temp =~ /(.+?)(\d{1,2}x\d{1,2}|s\d{1,2}e\d{1,2})/ix) { $inventory{$1}=$2; }