Regular Expressions 101

Community Patterns

TI dis6x to "binary as ASCII"

0

Regular Expression
PCRE2 (PHP >=7.3)

/
[0-9a-f]{8} *(?'one'[0-9a-f]{2})(?'two'[0-9a-f]{2})(?'three'[0-9a-f]{0,2})(?'four'[0-9a-f]{0,2})
/
gm

Description

Automated version of process described here

  • Takes TI dis6x disassembly output
  • Removes leading address and spaces
  • Rotates endianess
  • Presents as "binary as ASCII" blob ready for insertion with HEX edit tool

Use ${four}${three}${two}${one} as substitution formula and turn on List mode for immediate output.

For a why take a look here

Submitted by https://github.com/ELynx - 2 years ago (Last modified 2 years ago)