List replacements by rules
Flatten[DeleteCases[SplitBy[lis, IntegerQ], {_Integer}]]
SequenceReplace[lis, {a_Symbol, _Integer, b_Symbol} -> Sequence[a, b]]
With[{s = ArrayPad[BlockMap[FreeQ[#, {_Symbol, _Integer, _Symbol}]&, lis, 3, 1], 1, True]}
Pick[lis,s]]
all give
{a, b, c, d, e, 2, 3, f}
ListCorrelate
can be useful.
lis = {a, b, c, 1, d, e, 2, 3, f};
bin = Boole[IntegerQ /@ lis]
Pick[lis, Unitize[ListCorrelate[{1, 2, 4}, bin, 2] - 2], 1]
{0, 0, 0, 1, 0, 0, 1, 1, 0} {a, b, c, d, e, 2, 3, f}
This is faster than either of the methods in kglr's answer that I am able to test in version 10.1:
lis = RandomChoice[{a, b, c, 1, d, e, 2, 3, f}, 150000];
With[{bin = Boole[IntegerQ /@ lis]},
Pick[lis, Unitize[ListCorrelate[{1, 2, 4}, bin, 2] - 2], 1]] //
Length // RepeatedTiming
Flatten[DeleteCases[SplitBy[lis, IntegerQ], {_Integer}]] // Length // RepeatedTiming
With[{s = ArrayPad[BlockMap[FreeQ[#, {_Symbol, _Integer, _Symbol}] &, lis, 3, 1], 1,
True]}, Pick[lis, s]] // Length // RepeatedTiming
{0.0556, 127770} {0.136, 127770} {0.1642, 127770}
Most of the time is spent on binarizing the list, so with a faster form for that:
With[{bin = Replace[lis, {_Integer -> 1, _ -> 0}, {1}]},
Pick[lis, Unitize[ListCorrelate[{1, 2, 4}, bin, 2] - 2], 1]] //
Length // RepeatedTiming
{0.0219, 127770}