一:
匹配上则取否则不取
匹配规则为
[sv=(?<sv>[^]]*?)].*?[os=(?<os>[^]]*?)].*?[net=(?<net>[^]]*?)].*?[lt=(?<lt>d*)].*?[tm=(?<acc_time>d{10}).*?[act=(?<act>[^]]*?)].*?({logid=(?<logid>[^}]*?)}.*
?)?({tm=(?<tm>[^}]*?)}.*?)?({ip=(?<ip>[^}]*?)}.*?)?({sta=(?<sta>[^}]*?)}.*?)?$
日志示例如下
[time=20150513000001][sv=8.2.5][sw=1080][os=android][ch=1006816c][pd=map][sh=1812][mb=HUAWEI MT7-TL10][ov=Android19][ver=2][cuid=C2908F33C958D3034B2C2A739AB94030|915749020461568][net=4][lt=2210][tm=1431446280.902][act=ccS][ActParam={ndn=738}{datasta=0}{nup=1004}{rep=0}{hsta=206}{logid=1495713664}{tm=267}{stda=1003}{start=1431446280}{sign=0e1ee35523c119ea7aa3e7098d640ec7}{light =1}]