The bug in this second issue appears to be in the documentation, not the code, since there's no good reason why Lua should ignore an explicit start argument when the caret is given, and valid reasons why it shouldn't ignore the start argument. Consider a simple tokenizer that repeatedly matches consecutive tokens without skipping anything else; the pattern could be prefixed with a ^ and suffixed with a position capture, and on each iteration, the result from the previous position capture is fed to the next call as the start argument. In this case, you would rely on the ^ meaning "anchor to start point", and a nil result would mean a syntax error in whatever you're tokenizing.