Advertisement
fotios

Regex to convert hex to valid bin

Sep 25th, 2011
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. :v/^\s/d # Remove all lines that are not code
  2. :s/.\{-}:\s\(.\{-}\)\s\+\t.*/\1 # Remove all non-machine code
  3.  
  4. # Remove all spaces, split the line into 4 hex chunks, split those into 8 chunks per line
  5. :g /\s\+/ | s/\s//g | s/\(.\{4}\)/\1 /g | s/\(\(.\{4} \)\{8}\)/\1\r/g
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement