What\'s the best way to print log lines that match a datetime range. For example:
I would like to print only lines with dates from: 2012/09/30-00:00:10 to: 2012/09/
Assuming you're reading the log line by line:
import re for line in log: if re.match("2012/09/30-00:00:1[0-3]", line): print line