通过正则表达式提取指定时间范围内的内容

有一段日志如下:
[2015-08-03 02:07:48.676][plugins][trace][thread 12765] baicells::ORanInterfacesHandler::ORanInterfacesHandler()
[2015-08-03 02:07:49.108][YangDataStore][info][thread 12765] SYSREPO: Connection 80 created.
[2015-08-03 02:07:49.114][plugins][trace][thread 12765] virtual void baicells::ORanInterfacesHandler::Load(std::shared_ptrbaicells::IYangDataStore, std::shared_ptrbaicells::MPlaneServiceTemplate)
[2015-08-03 02:08:01.998][ProtobufCodec][trace][thread 12800] std::__cxx11::string baicells::Message2Xml(std::shared_ptrgoogle::protobuf::Message)
[2015-08-03 02:08:01.998][ProtobufCodec][trace][thread 12800] std::__cxx11::string baicells::Message2Xml(google::protobuf::Message&)
[2015-08-03 02:08:01.998][ProtobufCodec][debug][thread 12800] Message[ietf_interfaces.Interfaces] convert to XML payload, DebugString:
[2015-08-03 02:08:03.632][ProtobufCodec][trace][thread 12799] std::__cxx11::string baicells::Message2Xml(google::protobuf::Message&)
[2015-08-03 02:08:03.632][ProtobufCodec][debug][thread 12799] Message[o_ran_fm.AlarmNotif] convert to XML payload, DebugString:

求正则表达式!!!!!搞不定
通过使用正则表达式提取2015-08-03 02:07:48到2015-08-03 02:08:01之间的日志, 可以通过正则表达式在线工具验证结果。
以上提取结果如下:
[2015-08-03 02:07:48.676][plugins][trace][thread 12765] baicells::ORanInterfacesHandler::ORanInterfacesHandler()
[2015-08-03 02:07:49.108][YangDataStore][info][thread 12765] SYSREPO: Connection 80 created.
[2015-08-03 02:07:49.114][plugins][trace][thread 12765] virtual void baicells::ORanInterfacesHandler::Load(std::shared_ptrbaicells::IYangDataStore, std::shared_ptrbaicells::MPlaneServiceTemplate)
[2015-08-03 02:08:01.998][ProtobufCodec][trace][thread 12800] std::__cxx11::string baicells::Message2Xml(std::shared_ptrgoogle::protobuf::Message)
[2015-08-03 02:08:01.998][ProtobufCodec][trace][thread 12800] std::__cxx11::string baicells::Message2Xml(google::protobuf::Message&)
[2015-08-03 02:08:01.998][ProtobufCodec][debug][thread 12800] Message[ietf_interfaces.Interfaces] convert to XML payload, DebugString:

[2015-08-03 02:0[7-8]:[0-9]{2}.*

试试这个呢,这个在秒数那里可能不太精准

你遇到什么困难吗?
(2015-08-03 02:07:48.*)[2015-08-03 02:08:01
就可以了啊,记得开启单行模式,不然不能跨行匹配。