Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 6, 2019 05:30
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 parzibyte/29f5f4983b284e92adf6f7e80fcfb777 to your computer and use it in GitHub Desktop.
Save parzibyte/29f5f4983b284e92adf6f7e80fcfb777 to your computer and use it in GitHub Desktop.
/**
*
* Comprobar si una cadena es un número hexadecimal usando
* expresiones regulares
* @author parzibyte
* Visita: parzibyte.me
*/
const esHexadecimal = numeroHexadecimal => /^[0-9A-F]+$/ig.test(numeroHexadecimal);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment