We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efb512d commit 09dd8abCopy full SHA for 09dd8ab
strnum.js
@@ -1,4 +1,4 @@
1
-const hexRegex = /^0x[a-fA-F0-9]+$/;
+const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
2
const numRegex = /^([\-\+])?(0*)(\.[0-9]+(e\-?[0-9]+)?|[0-9]+(\.[0-9]+(e\-?[0-9]+)?)?)$/;
3
// const octRegex = /0x[a-z0-9]+/;
4
// const binRegex = /0x[a-z0-9]+/;
0 commit comments