#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?P<remoteAdd>[0-9.]+) - (?P<remoteUser>[a-zA-z]+) \[(?P<timestamp>[^\]]+)] "(?P<request>[^"]+)" (?P<status>[0-9]+) (?P<bodyBytesSent>[0-9]+) "(?P<httpReferer>[^"]+)" "(?P<httpUserAgent>[^"]+)""
Local $sString = "----NGINX----" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"127.0.0.1 - dbmanager [20/Nov/2017:18:52:17 +0000] "GET / HTTP/1.1" 401 188 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
" '$remote_addr - $remote_user [$time_local] "$request" '" & @CRLF & _
" '$status $body_bytes_sent "$http_referer" '" & @CRLF & _
" '"$http_user_agent" "$http_x_forwarded_for"'"
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