Skip to content

Instantly share code, notes, and snippets.

@Starefossen
Last active December 14, 2015 11:49
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 Starefossen/5082331 to your computer and use it in GitHub Desktop.
Save Starefossen/5082331 to your computer and use it in GitHub Desktop.
String::isHex()
String::isHex = -> pat = (/^0[xX][0-9a-fA-F]+$/i); return pat.test(@)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment