3 ms·
I like to think of "whatever browsers do in js" as an updated common baseline. Whatever your regex engine does, describe it as a delta to the js precedent. That
by usrusr 3y ago
I like to think of "whatever browsers do in js" as an updated common baseline. Whatever your regex engine does, describe it as a delta to the js precedent. That thing is just so ubiquitous.
I do wonder though what's the highest number of different regex syntaxes I've ever encountered (perhaps written?) within a single line: bash, grep and sed are never not in a "hold my beer" mood!
- psd1 3y agoReason #2 to use powershell - consistent regex. I've got "hold my beer" commits in .net - I've balanced brackets. I believe that's impossible in sed and grep. If I were going to write a json parser in a script, then a) stop me and b) it's got to be in powershell.
- layer8 3y agoThat seems like just a web front-end developer’s perspective.
- Calzifer 3y agoIsn't JavaScripts regex one of the worst modern regex implementations? They seem to improve. Negative lookbehind isn't missing anymore [1]. But still lack the handy \Q and \E to escape stuff [2]. [1] https://stackoverflow.com/a/3950684 https://stackoverflow.com/a/3950684 [2] https://stackoverflow.com/q/6318710 https://stackoverflow.com/q/6318710
- kstrauser 3y agoI’ll go along with that, as long as someone ports pcre to JavaScript and that’s the browser syntax we land on.
- mwpmaybe 3y ago> I do wonder though what's the highest number of different regex syntaxes I've ever encountered (perhaps written?) within a single line: bash, grep and sed are never not in a "hold my beer" mood! Your comment is missing a trigger warning, lol. But seriously, this is one of my flags for "this should probably be a script, or an awk or perl one-liner."