#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?P<datetime>\d{2}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}): (?P<name>\w+(?::\s*\w+)*|[\w\s]+?)(?:\s+(?P<action>joined|left|was removed|changed the (?:subject to “\w+â€|group icon))|:\s(?P<message>(?:.+|\n(?!\n))+))"
Local $sString = "29/03/14 15:48:05: John Smith changed the subject to “Testâ€" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:10:39: John Smith joined" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:10:40: Person:2 joined" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:10:40: John Smith: Hello!" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:11:40: Person:2: some random words," & @CRLF & _
"" & @CRLF & _
"29/03/14 16:12:40: Person3 joined" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:13:40: John: Smith: Hello!Test message with newline" & @CRLF & _
"Another line of the same message" & @CRLF & _
"Another line." & @CRLF & _
"" & @CRLF & _
"29/03/14 16:14:43: Person:2: Test message using as last word joined" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:15:57: Person3 left" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:17:16: Person3 joined" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:18:21: Person:2 changed the group icon" & @CRLF & _
"" & @CRLF & _
"29/03/14 16:19:16: Person3 was removed " & @CRLF & _
"" & @CRLF & _
"29/03/14 16:20:43: Person:2: Test message using as last word left"
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