Seite 1 von 1

Text aus binary file extrahieren

Verfasst: Mittwoch 12. Juni 2013, 11:12
von kstieger
Hi,
ich suche eine Lösung um aus einem binary file alle lesbaren Textteile mit python zu etrahieren.
Etwa so wie es 'strings' in Linux macht.

Hat da jemand eine Idee?

Besten Dank im voraus.

Re: Text aus binary file extrahieren

Verfasst: Mittwoch 12. Juni 2013, 12:21
von Sirius3

Code: Alles auswählen

import re
strings = re.findall(r'[\s\x20-\x7e]{5,}', data)