in reply to Re^3: Speed of simple pattern count. A comparison
in thread Speed of simple pattern count. A comparison
I agree, this one test uses +2 more characters, but it is like included in the test as a tool.
But now I think the first 'x' which is prepended is simply redundant, because if the string starts with "ab", it anyways gives an empty string as a leftmost result. The appended 'x' is not redundant, because if the string ends with pattern "ab", then it doesn't produce an empty string as a rightmost result. But here comes 'split' with three parameters with third being '-1', and then there is no need to append something like 'x'.