> In the second case, I expect to receive a table from the match but get > only the first field as a string. You should use lpeg.Ct instead of lpeg.C for this. (Unfortunately I haven't used the "re" module, so I've no idea about the case problem)