#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "DEBUG[^*]*"
Local $sString = "* DEBUG [2015/11/25 00:06:59] /usr/local/elsa/node/elsa.pl (184) main:: 22497 [undef]" & @CRLF & _
"Starting process_batch" & @CRLF & _
"* DEBUG [2015/11/25 00:06:59] /usr/local/elsa/node/elsa.pl (271) main::_process_batch 22497 [undef]" & @CRLF & _
"Offline processing: and using tempfile /data/elsa/tmp/buffers/1448438819.71967" & @CRLF & _
"* ERROR [2015/11/25 00:06:59] /usr/local/elsa/node/elsa.pl (295) main::_process_batch 22497 [undef]" & @CRLF & _
"Unable to parse log line: . Only parsed into:" & @CRLF & _
"$VAR1 = [];" & @CRLF & _
"* DEBUG [2015/11/25 00:06:59] /usr/local/elsa/node/elsa.pl (316) main::_process_batch 22497 [undef]" & @CRLF & _
"Finished job process_batch with 0 logs processed and 0 new programs" & @CRLF & _
"* DEBUG [2015/11/25 00:06:59] /usr/local/elsa/node/elsa.pl (318) main::_process_batch 22497 [undef]" & @CRLF & _
"file size for file /data/elsa/tmp/buffers/1448438819.71967 is 0" & @CRLF & _
"* TRACE [2015/11/25 00:06:59] /usr/local/elsa/node/elsa.pl (327) main::_process_batch 22497 [undef]" & @CRLF & _
"No logs recorded" & @CRLF & _
"* DEBUG [2015/11/25 00:06:59] /usr/local/elsa/node/elsa.pl (188) main:: 22497 [undef]" & @CRLF & _
"Processed 0 records" & @CRLF & _
"* INFO [2015/11/25 00:07:00] /usr/local/elsa/node/elsa.pl (206) main:: 22497 [undef]" & @CRLF & _
"Exiting after processing 0 records" & @CRLF & _
"* TRACE [2015/11/25 00:07:04] /usr/local/elsa/node/elsa.pl (135) main:: 22520 [undef]" & @CRLF & _
"Processing file __OPS__..." & @CRLF & _
"* DEBUG [2015/11/25 00:07:04] /usr/local/elsa/node/elsa.pl (271) main::_process_batch 22520 [undef]" & @CRLF & _
"Offline processing: and using tempfile /data/elsa/tmp/buffers/ops_1448438824.46437" & @CRLF & _
"* TRACE [2015/11/25 00:07:04] /usr/local/elsa/node/elsa.pl (135) main:: 22526 [undef]" & @CRLF & _
"Processing file __IMPORT__..." & @CRLF & _
"* INFO [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (332) Indexer::initial_validate_directory 22522 [undef]" & @CRLF & _
"Deleting stale ops log /data/elsa/tmp/buffers/ops_1448438824.46437" & @CRLF & _
"* DEBUG [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (364) Indexer::initial_validate_directory 22522 [undef]" & @CRLF & _
"files: $VAR1 = [" & @CRLF & _
" '/data/elsa/tmp/buffers/.'," & @CRLF & _
" '/data/elsa/tmp/buffers/..'" & @CRLF & _
" ];" & @CRLF & _
"* DEBUG [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (366) Indexer::initial_validate_directory 22522 [undef]" & @CRLF & _
"considering file /data/elsa/tmp/buffers/." & @CRLF & _
"* DEBUG [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (366) Indexer::initial_validate_directory 22522 [undef]" & @CRLF & _
"considering file /data/elsa/tmp/buffers/.." & @CRLF & _
"* TRACE [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (1782) Indexer::_get_lock 22522 [undef]" & @CRLF & _
"Locked directory" & @CRLF & _
"* DEBUG [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (567) Indexer::_validate_directory 22522 [undef]" & @CRLF & _
"Wiping via index temp_1" & @CRLF & _
"* TRACE [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (2195) Indexer::_sphinx_index 22522 [undef]" & @CRLF & _
"Starting Sphinx indexing for temp_1" & @CRLF & _
"* DEBUG [2015/11/25 00:07:04] /usr/local/elsa/node/Indexer.pm (2201) Indexer::_sphinx_index 22522 [undef]" & @CRLF & _
"output: Sphinx 2.1.9-id64-release (rel21-r4761)" & @CRLF & _
"Copyright (c) 2001-2014, Andrew Aksyonoff" & @CRLF & _
"Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)"
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