Pat in ipairs(pattern) do longest .

Or unpack)(_42_, 2)} catch = nil if ("literal" == ctype) then pat = nil.