Skip to content

Commit 09dd8ab

Browse files
authored
Add optional negative / positive indicator
1 parent efb512d commit 09dd8ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

strnum.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const hexRegex = /^0x[a-fA-F0-9]+$/;
1+
const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
22
const numRegex = /^([\-\+])?(0*)(\.[0-9]+(e\-?[0-9]+)?|[0-9]+(\.[0-9]+(e\-?[0-9]+)?)?)$/;
33
// const octRegex = /0x[a-z0-9]+/;
44
// const binRegex = /0x[a-z0-9]+/;

0 commit comments

Comments
 (0)