2 ms·
I guess I need to buff up on my automata, but I would have thought that for positional delimiters, there would be optimizations. If the pattern is \s+$, then I
by unethical_ban 10y ago
I guess I need to buff up on my automata, but I would have thought that for positional delimiters, there would be optimizations. If the pattern is \s+$, then I can look from the back of the line, see if there is a space, and if so, go backward until I find a non-space character.
- viraptor 10y agoThat's just special casing the end of line. If it was "\s+x" you'd still have the same problem.