4 ms·
I 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 test
by thiht 5y ago
I 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 :)