Skip to content

Instantly share code, notes, and snippets.

@reconbot
Created July 29, 2017 19:29
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 reconbot/acc0d07b85854b412411e86398883357 to your computer and use it in GitHub Desktop.
Save reconbot/acc0d07b85854b412411e86398883357 to your computer and use it in GitHub Desktop.
function decodeHexEscape(str) {
return str.replace(/\\x([a-fA-F0-9]{2})/g, (a, b) => {
return String.fromCharCode(parseInt(b, 16));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment