#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(\w+\s+\w+\s+[\d:\s]+[A-Z]{3}\s+\d{4})[\s\S]+?((?:\w+)\s+(?:[0-9.]+))\s+(?:((?:\w+)\s*(?:[0-9.]+)))?\s+(?:((?:\w+)\s*(?:[0-9.]+)))?\s*(?:((?:\w+)\s+(?:[0-9.]+)))?\s*(?:((?:\w+)\s*(?:[0-9.]+)))?"
Local $sString = "Mon Feb 1 09:12:41 GMT 2016" & @CRLF & _
"" & @CRLF & _
"Rotating fax log files:" & @CRLF & _
"" & @CRLF & _
"Doing login accounting:" & @CRLF & _
" total 688.31" & @CRLF & _
" example 401.12" & @CRLF & _
" _mbsetupuser 287.10" & @CRLF & _
" root 0.05" & @CRLF & _
" admin 0.04" & @CRLF & _
"" & @CRLF & _
"-- End of monthly output --" & @CRLF & _
"" & @CRLF & _
"Tue Feb 16 14:27:21 GMT 2016" & @CRLF & _
"" & @CRLF & _
"Rotating fax log files:" & @CRLF & _
"" & @CRLF & _
"Doing login accounting:" & @CRLF & _
" total 0.00" & @CRLF & _
"" & @CRLF & _
"-- End of monthly output --" & @CRLF & _
"" & @CRLF & _
"Thu Mar 3 09:37:31 GMT 2016" & @CRLF & _
"" & @CRLF & _
"Rotating fax log files:" & @CRLF & _
"" & @CRLF & _
"Doing login accounting:" & @CRLF & _
" total 377.92" & @CRLF & _
" example 377.92" & @CRLF & _
"" & @CRLF & _
"-- End of monthly output --"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm