- my ($first, $drop1, $last, $drop2) = $_ =~ /(e\d+\-[123456])(sw)?\s*\-\s*(e\d+\-[123456])?(sw)?/;
- if (!defined($first) && $_ =~ /e\d+\-[123456]/) {
+ my ($first, $last) = $_ =~ /(e\d+\-(?:sw)?[123456])\s*\-\s*(e\d+\-(?:sw)?[123456])?/;
+ if (!defined($first) && $_ =~ /e\d+\-(sw)?[123456]/) {