#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(.*\[(error|warning|notice|info|debug)\].*)$"
Local $sString = "lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,193 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Company.Departments:91...ROOT.src.Core.Database:263...ROOT.src.Core.Statistics:390: Memory usage: 7.63MB (8.00MB real), max 7.83MB (8.00MB real)" & @CRLF & _
"lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,193 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Company.Departments:91...ROOT.src.Core.Database:263...ROOT.src.Core.Database:513: DB CACHE GET OK (total: 0, cache: 0): bcp_departments-4934846.3903997f7fe55eb81eaa07fc5e598ba0" & @CRLF & _
"lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,194 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Company.Departments:91...ROOT.src.Core.Database:263...ROOT.src.Service.Cache.Request:72: REQUEST CACHE SET "bcp_departments-4934846.3903997f7fe55eb81eaa07fc5e598ba0" : object" & @CRLF & _
"lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,237 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Service.Feature:140: get_real_value (webtracking, skype, GB): 1" & @CRLF & _
"lu2-pre-sm-swap-manager1 (192.168.236.230) 2014-07-24 14:09:27,240 [debug] PRE-BCP 213.146.188.31 [marti.us] bcp:4934846 GET 3a90f85c /members/overview session_id: 5037d3bfa31 version: 1.54.0-SNAPSHOT-11881644 ROOT.src.Swap.Application2:553: serve_endpoint (members/overview): OK"
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