The year is 2014. Most JS-parsers-in-JS use this pattern: function isValidRegExp(pattern) { try { new RegExp(pattern); return true; } catch { return false; } }
-
-
https://github.com/shapesecurity/shift-regexp-acceptor-js … makes it look like it doesn’t have to be overkill. It’s an extremely lightweight JS RegExp acceptor that implements the full spec grammar.
Show this threadThanks. 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.