in test-snapshot-binaries/linux_load_commands.py [0:0]
def regex_string(self):
if self.value == ParseState.firstLine:
return "There are (\d+) program headers"
if self.value == ParseState.programHeadersLine:
return "Program Headers:"
if self.value == ParseState.dataHeader:
return "\\s+Type"
if self.value == ParseState.data:
name = "(\w+)"
hex_pattern = "0x[0-9a-fA-F]+"
ws = "\s"
col = "{}+{}".format(ws, hex_pattern)
return "^{ws}*{name}{col}{col}{col}{col}{col} (.+) 0x".format(**
{'ws': ws, 'name': name, 'col': col})
raise RuntimeError('Invalid ParseState value')