Further to GrandFather's wise advice on regex factoring, here's another approach.
The idea is that the requirement to "not match ... if ... a certain server name or a certain string comes before Servername" suggests a negative look-behind assertion. The problem with this is the inference I make that the look-behind could be variable-width, and such a look-behind is not directly supported in Perl 5. (I am perhaps improperly reading into the above quotation the possibility that there could be two or more strings of differing lengths to be excluded.)
A variable-width negative look-behind can be emulated. The trick is that a positive match on one of several completely arbitrary patterns causes a substring needed in a subsequent match to be 'consumed', and then the whole sub-match is 'failed', preventing the subsequent match from succeeding. See (*SKIP) and (*FAIL) (only available in 5.10+) in the Special Backtracking Control Verbs section of perlre.
>perl -wMstrict -le
"my @strs = (
'Servername FOO',
'fine Servername FOO yyy',
'no Servername FOO zzz',
'cool Servername BAR',
'nyet Servername BAR vvv',
'Servername BOFF',
'ok Servername BOFF yyy',
'no Servername BOFF zzz',
);
;;
my @names = qw(FOO BAR);
my @avoid = qw(no nyet);
;;
my $find = join '|', @names;
$find = qr{ Servername \s+ (?: $find) }xms;
;;
my $not_before = join '|', @avoid;
$not_before = qr{ (?: $not_before) \s+ Servername }xms;
$not_before = qr{ (?: $not_before (*SKIP)(*FAIL))? }xms;
;;
for my $s (@strs) {
print qq{'$s'} if $s =~ m{ $not_before $find }xms;
}
"
'Servername FOO'
'fine Servername FOO yyy'
'cool Servername BAR'