other/tgrep.py - better handling of various formats