#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^\D{8}(?<severity>\w)(?<time>\d{4}\s[^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\](?<message>.*[/\/n])([\W]*[\w]*){3}[\W]{3}(?<logdate>[\d]*\-[\d]*\-[\d]*)\w(?<logtime>[\d]*\:[\d]*\:[\d]*\.[\d]*)\w\W*$"
Local $sString = "{"log":"I1219 13:32:01.389913 1 server.go:114] Version: v1.8.0\n","stream":"stderr","time":"2017-12-19T13:32:01.390360472Z"}" & @CRLF & _
"{"log":"I1219 13:32:01.390379 1 plugins.go:101] No cloud provider specified.\n","stream":"stderr","time":"2017-12-19T13:32:01.390969576Z"}" & @CRLF & _
"{"log":"I1219 13:32:01.634232 1 feature_gate.go:156] feature gates: map[Initializers:true]\n","stream":"stderr","time":"2017-12-19T13:32:01.635347611Z"}" & @CRLF & _
"{"log":"I1219 13:32:01.635456 1 initialization.go:84] enabled Initializers feature as part of admission plugin setup\n","stream":"stderr","time":"2017-12-19T13:32:01.635590586Z"}" & @CRLF & _
"{"log":"W1219 13:32:01.636255 1 admission.go:66] PersistentVolumeLabel admission controller is deprecated. Please remove this controller from your configuration files and scripts.\n","stream":"stderr","time":"2017-12-19T13:32:01.636854971Z"}" & @CRLF & _
"{"log":"W1219 13:32:01.713333 1 genericapiserver.go:317] Skipping API batch/v2alpha1 because it has no resources.\n","stream":"stderr","time":"2017-12-19T13:32:01.713583761Z"}" & @CRLF & _
"{"log":"W1219 13:32:01.731298 1 genericapiserver.go:317] Skipping API rbac.authorization.k8s.io/v1alpha1 because it has no resources.\n","stream":"stderr","time":"2017-12-19T13:32:01.732776091Z"}" & @CRLF & _
"{"log":"[restful] 2017/12/19 13:32:01 log.go:33: [restful/swagger] listing is available at https://185.150.9.204:6443/swaggerapi\n","stream":"stderr","time":"2017-12-19T13:32:01.799479979Z"}" & @CRLF & _
"{"log":"[restful] 2017/12/19 13:32:01 log.go:33: [restful/swagger] https://185.150.9.204:6443/swaggerui/ is mapped to folder /swagger-ui/\n","stream":"stderr","time":"2017-12-19T13:32:01.799497746Z"}" & @CRLF & _
"{"log":"[restful] 2017/12/19 13:32:02 log.go:33: [restful/swagger] listing is available at https://185.150.9.204:6443/swaggerapi\n","stream":"stderr","time":"2017-12-19T13:32:02.471721558Z"}" & @CRLF & _
"{"log":"[restful] 2017/12/19 13:32:02 log.go:33: [restful/swagger] https://185.150.9.204:6443/swaggerui/ is mapped to folder /swagger-ui/\n","stream":"stderr","time":"2017-12-19T13:32:02.47174796Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992367 1 serve.go:85] Serving securely on 0.0.0.0:6443\n","stream":"stderr","time":"2017-12-19T13:32:04.993893788Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992843 1 apiservice_controller.go:112] Starting APIServiceRegistrationController\n","stream":"stderr","time":"2017-12-19T13:32:04.993922573Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992865 1 cache.go:32] Waiting for caches to sync for APIServiceRegistrationController controller\n","stream":"stderr","time":"2017-12-19T13:32:04.993925574Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992909 1 available_controller.go:192] Starting AvailableConditionController\n","stream":"stderr","time":"2017-12-19T13:32:04.993927705Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992925 1 cache.go:32] Waiting for caches to sync for AvailableConditionController controller\n","stream":"stderr","time":"2017-12-19T13:32:04.993929704Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992944 1 crd_finalizer.go:242] Starting CRDFinalizer\n","stream":"stderr","time":"2017-12-19T13:32:04.993931736Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992949 1 customresource_discovery_controller.go:152] Starting DiscoveryController\n","stream":"stderr","time":"2017-12-19T13:32:04.993933463Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992953 1 naming_controller.go:277] Starting NamingConditionController\n","stream":"stderr","time":"2017-12-19T13:32:04.993935376Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992975 1 crdregistration_controller.go:112] Starting crd-autoregister controller\n","stream":"stderr","time":"2017-12-19T13:32:04.993937164Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.992979 1 controller_utils.go:1041] Waiting for caches to sync for crd-autoregister controller\n","stream":"stderr","time":"2017-12-19T13:32:04.993939029Z"}" & @CRLF & _
"{"log":"I1219 13:32:04.994147 1 controller.go:84] Starting OpenAPI AggregationController\n","stream":"stderr","time":"2017-12-19T13:32:04.994289148Z"}" & @CRLF & _
"{"log":"I1219 13:32:05.092979 1 cache.go:39] Caches are synced for APIServiceRegistrationController controller\n","stream":"stderr","time":"2017-12-19T13:32:05.093392359Z"}" & @CRLF & _
"{"log":"I1219 13:32:05.092978 1 cache.go:39] Caches are synced for AvailableConditionController controller\n","stream":"stderr","time":"2017-12-19T13:32:05.093418406Z"}" & @CRLF & _
"{"log":"I1219 13:32:05.093102 1 controller_utils.go:1048] Caches are synced for crd-autoregister controller\n","stream":"stderr","time":"2017-12-19T13:32:05.093430972Z"}" & @CRLF & _
"{"log":"I1219 13:32:05.093142 1 autoregister_controller.go:136] Starting autoregister controller\n","stream":"stderr","time":"2017-12-19T13:32:05.093433199Z"}" & @CRLF & _
"{"log":"I1219 13:32:05.093146 1 cache.go:32] Waiting for caches to sync for autoregister controller\n","stream":"stderr","time":"2017-12-19T13:32:05.093435176Z"}" & @CRLF & _
"{"log":"I1219 13:32:05.193207 1 cache.go:39] Caches are synced for autoregister controller\n","stream":"stderr","time":"2017-12-19T13:32:05.193541587Z"}" & @CRLF & _
"{"log":"I1219 13:32:09.998168 1 trace.go:76] Trace[1836345649]: \"Create /api/v1/namespaces\" (started: 2017-12-19 13:32:05.995599565 +0000 UTC) (total time: 4.002539088s):\n","stream":"stderr","time":"2017-12-19T13:32:10.008954395Z"}" & @CRLF & _
"{"log":"Trace[1836345649]: [4.000446951s] [4.000418303s] About to store object in database\n","stream":"stderr","time":"2017-12-19T13:32:10.008974063Z"}" & @CRLF & _
"{"log":"I1219 13:32:10.629009 1 trace.go:76] Trace[1988456937]: \"Create /api/v1/namespaces/kube-system/events\" (started: 2017-12-19 13:32:06.625541932 +0000 UTC) (total time: 4.003444046s):\n","stream":"stderr","time":"2017-12-19T13:32:10.63530296Z"}" & @CRLF & _
"{"log":"Trace[1988456937]: [4.001682236s] [4.001642828s] About to store object in database\n","stream":"stderr","time":"2017-12-19T13:32:10.635326659Z"}" & @CRLF & _
"{"log":"I1219 13:32:11.593994 1 trace.go:76] Trace[1945366238]: \"Create /api/v1/nodes\" (started: 2017-12-19 13:32:07.591993863 +0000 UTC) (total time: 4.00197912s):\n","stream":"stderr","time":"2017-12-19T13:32:11.59759386Z"}" & @CRLF & _
"{"log":"Trace[1945366238]: [4.000615689s] [4.000505107s] About to store object in database\n","stream":"stderr","time":"2017-12-19T13:32:11.597618565Z"}" & @CRLF & _
"{"log":"I1219 13:32:12.651139 1 trace.go:76] Trace[648564056]: \"Create /api/v1/namespaces/kube-system/events\" (started: 2017-12-19 13:32:08.641834265 +0000 UTC) (total time: 4.009285942s):\n","stream":"stderr","time":"2017-12-19T13:32:12.65281182Z"}" & @CRLF & _
"{"log":"Trace[648564056]: [4.001050787s] [4.001021095s] About to store object in database\n","stream":"stderr","time":"2017-12-19T13:32:12.652826332Z"}" & @CRLF & _
"{"log":"I1219 13:32:14.684575 1 trace.go:76] Trace[1339119512]: \"Create /apis/authentication.k8s.io/v1/tokenreviews\" (started: 2017-12-19 13:32:10.677360533 +0000 UTC) (total time: 4.007189394s):\n","stream":"stderr","time":"2017-12-19T13:32:14.689524885Z"}" & @CRLF & _
"{"log":"Trace[1339119512]: [4.004918437s] [4.004846143s] About to store object in database\n","stream":"stderr","time":"2017-12-19T13:32:14.689537857Z"}" & @CRLF & _
""
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