Skip to content

Instantly share code, notes, and snippets.

@benwei
Created July 6, 2014 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwei/ee79bf2d08cfc4603333 to your computer and use it in GitHub Desktop.
Save benwei/ee79bf2d08cfc4603333 to your computer and use it in GitHub Desktop.
vim search and replace binary characters by regular expression
/\%xnn characters (nn range is 00-FF)
%s/\%xnn//g -- replace all \xnn characters (nn range is 00-FF)
%s/\%unnnn//g -- replace all unicode code 'nnnn' characters, (nn range is 0000-FFFF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment