Sublime Regex查找行

问题描述:

我有非常大的日志文件。看起来是这样的:Sublime Regex查找行

xx.xx.xx site.com - [SomeDate] "GET somePath" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) someElseInfo ... 
xx.xx.xx site.com - [SomeDate] "GET somePath" "Mozilla/5.0 (Windows NT 5.1; MSIE 8.0) someElseInfo ... 
xx.xx.xx site.com - [SomeDate] "GET somePath" "Mozilla/5.0 (Windows NT 5.2; WOW64; MSIE 7.0 rv:11.0) someElseInfo ... 

我需要检查多少行包含 '/ WINDOWS NT 5.1/i' 和 '/ MSIE 8./i' 如何做到这一点的崇高?

^(?=.*?windows nt 5\.1)(?=.*?msie 8\.).*$ 

试试这个。

http://regex101.com/r/dN8sA5/15

+0

这对我有用!感谢名单! – 2014-09-29 11:39:21