3 ms·
What use do you have for that in a web application? Anecdote: I tried (limited) CSS validation to through a regexp some time ago, and it worked, except that Ch
by tgv 5y ago
What use do you have for that in a web application?
Anecdote: I tried (limited) CSS validation to through a regexp some time ago, and it worked, except that Chrome’s implementation jumped from a few 100ms to over 5 minutes on adding a single character. Made the whole thing quite useless.
- olliej 5y agolook behind assertions can be super useful - obviously you can workaround the lack of them, but sometimes simply having them there makes life easier. OTOH get look behind perf to not be horrific is challenging
- thiht 5y agoI recently used a lookbehind to replace \n by \r\n only if it’s not already preceded by \r. It was in a VSCode extension, because the output channel of the testing workbench stupidly requires \r\n, otherwise it doesn’t go to the beginning of the line. I could have done it without a lookbehind but occasions to use it are quite rare to me :)