On Mon, Jul 7, 2014 at 9:18 AM, Austin Einter <firstname.lastname@example.org> wrote:How about something really simple?
> Please note that, input string might have some data before or after of given
> example values.
local lens = input:match('^Content%-Length%s*:%s+(%d+)%s+$')
if lens then -- gotcha Content-length
len = tonumber(lens)
Note how '-' must be escaped...%s matches all whitespace, including line ends.