#include <Array.au3>
Local $sSource = _
'@17-DEC-15 08:11:04 SN C0002EB316' & @CRLF & _
'"17-DEC-15 08:11:14' & @CRLF & _
'@17-DEC-15 08:11:14 SN C0002DE116' & @CRLF & _
'"17-DEC-15 08:11:22' & @CRLF & _
'@17-DEC-15 08:11:22 SN C0002DE016' & @CRLF & _
'FAILED' & @CRLF & _
'"17-DEC-15 08:11:29' & @CRLF & _
'@17-DEC-15 08:11:29 SN C0002DDF16' & @CRLF & _
'"17-DEC-15 08:11:36' & @CRLF & _
'@17-DEC-15 08:11:36 SN C0002EB616' & @CRLF & _
'"17-DEC-15 08:11:44' & @CRLF & _
'@17-DEC-15 08:11:44 SN C0002EB416' & @CRLF & _
'"17-DEC-15 08:11:51' & @CRLF
;~MsgBox(0, '源字符串', $sSource)
Local $aSRE = StringRegExp($sSource, 'SN\h+(\S+)\s*(FAILED|)\v+"', 3)
_ArrayDisplay($aSRE, UBound($aSRE))
|