This is a very small script I wrote for a friend who severely damaged his filesystem but really needed some TeX files. Luckily he began all his TeX with a header, so it's really easy to look for that in the raw binary data of the device.
Usage is described in regexfind.py