local data = 'asdds d sf fsadsadsad<body onload="javascrip:()">the text inside the tag</body>asdsadas ds fsd sdf dsadsad'
local tag = 'body'
local tagStart, tagEnd = data:find('<' .. tag .. '.->')
local closeTagStart, closeTagEnd = data:find('</' .. tag .. '.->', tagEnd + 1)
local textStart, textEnd = tagEnd + 1, closeTagStart - 1
local msg = data:sub(textStart, textEnd)
print(msg)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
fromDate = '2014-11-15'
for line in open('/var/log/dpkg.log'):
date, time, action, name, other = line.split(' ', 4)
if date >= fromDate and action == "install":
print(name)