Use a Regex:
string hex1 = " 7E 00 0F 10 01 00 13 A2 00 40 81 AB C4 FF FE 00 00 01 0B ";
string hex2 = " 7E 00 0F 10 01 00 13 A2 00 40 81 AB C4 FF FE 00 00 01 FF FE 66 0B ";
Regex reg = new Regex(@"(?<=7E 00 0F 10 01 00 13 A2 00 40 81 AB C4 FF FE 00 00 )(.. )*(?=0B )");
Match m = reg.Match(hex1);
if (m.Success)
{
Console.WriteLine(m.Value);
}
m = reg.Match(hex2);
if (m.Success)
{
Console.WriteLine(m.Value);
}
Will produce:
01
01 FF FE 66