How would you use regular expressions to parse through binary files?
What I have so far
import re
format = re.compile() <--
f.open("input.dat", "rb")
for line in f.readlines():
data = re.search(format, line)
I'm not sure what to put inside compile as I am only used to writing regex for strings.
specifically I want so break down the format to be:
2 bytes, 2 bytes, 18 bytes