finding a regex that actually matches all valid forms of JS numbers (ints, floats, trailing . , leading . , exponents, etc) is proving hard
-
-
@mathias also, "-42." doesn't match your regex… shouldn't it? -
@getify No, ’cause that is a unary expression followed by a numeric literal. - 3 more replies
New conversation -
-
-
@mathias interesting. i don't think that approach works for finding/parsing numbers out of JS code tho, b/c of the $ and ^ -
- 1 more reply
New conversation -
-
-
@mathias i think number literals are going to have to be added to "literalizer" so we can find them w/ heuristic lexing. :/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.