如何使用regex-Python打印具有GET-between时间范围的行

如何使用regex-Python打印具有GET-between时间范围的行,python,regex,file,regex-lookarounds,regex-group,Python,Regex,File,Regex Lookarounds,Regex Group,我的日志文件在下面。需要找到在2018-07-11 10和2018-07-11 11之间已开通并运行的线路 2018-07-11 10:12:06 12.115.14.240 PUT/apng/assembler-2.0/assembler2.php HTTP/1.1 403 231http://littlesvr.ca/apng/history.html 2018-07-11 10:15:06 202.167.250.99 GET/apng/images/o_sample.png?14247

我的日志文件在下面。需要找到在2018-07-11 10和2018-07-11 11之间已开通并运行的线路

2018-07-11 10:12:06 12.115.14.240 PUT/apng/assembler-2.0/assembler2.php HTTP/1.1 403 231http://littlesvr.ca/apng/history.html 2018-07-11 10:15:06 202.167.250.99 GET/apng/images/o_sample.png?142475198 HTTP/1.1403 115656http://bbs.mydigit.cn/read.php 2018-07-11 11:16:06 120.115.144.240 GET/apng/assembler-2.0/assembler2.php HTTP/1.1200 231http://littlesvr.ca/apng/history.html

渴望
2018-07-11 10:15:06 202.167.250.99 GET/apng/images/o_sample.png?142475198 HTTP/1.1403 115656http://bbs.mydigit.cn/read.php

我认为正则表达式会起作用:

rx=r^2018-07-11 10 | 1.*获取 不要使用log=f.read。用于f:中的行,然后如果“GET”在line:printline中。
with open(log) as f:
    log = f.read()
    ###if condition to show to get GET
          line = re.search(rx,log)