my @strings = (
"Gi0/0/0.SI.3361",
"Gi0/0/0.SI.4444",
"Gi1/1/1.SI.2222",
"InvalidString"
);
my $pattern = qr/\S+\.SI\.\S+/;
foreach my $s (@strings) {
if ($s =~ $pattern) {
print "Совпадение найдено: $s\n";
}
}
Например
Gi0/0/0.SI.3361
Gi0/0/0.SI.4444
Gi1/1/1.SI.2222