Do you know where exactly this number is (that is, it is shifted in the packet)? Or do you only know that somewhere in the package there are 15 digits in a string that are IMEI?
If the answer to the first question is yes, then there should not be any problems with extracting the IMEI, so I believe that it is not.
The following applies only if the package structure is completely unknown, so all you can do is search for 15 digits per line and hope this is IMEI.
Python ( ), ( ) , \d{15},
, (, ):
def findImei(packet):
start = -1;
cnt = 0;
for i, c in enumerate(packet):
if not c.isdigit():
cnt = 0;
continue;
if cnt == 0:
start = i;
cnt += 1;
if cnt == 15:
return packet[start : i + 1]
return None;