Created
August 6, 2019 05:30
-
-
Save parzibyte/29f5f4983b284e92adf6f7e80fcfb777 to your computer and use it in GitHub Desktop.
Saber si es hexadecimal en JS - https://parzibyte.me/blog/2018/11/09/expresion-regular-numero-hexadecimal-javascript/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* 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