#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?m)(?<Changed>^[^-]*$)"
Local $sString = "Changed Attributes:" & @CRLF & _
" SAM Account Name: -" & @CRLF & _
" Display Name: -" & @CRLF & _
" User Principal Name: -" & @CRLF & _
" Home Directory: -" & @CRLF & _
" Home Drive: -" & @CRLF & _
" Script Path: -" & @CRLF & _
" Profile Path: -" & @CRLF & _
" User Workstations: -" & @CRLF & _
" Password Last Set: -" & @CRLF & _
" Account Expires: -" & @CRLF & _
" Primary Group ID: -" & @CRLF & _
" AllowedToDelegateTo: -" & @CRLF & _
" Old UAC Value: 0x19A11" & @CRLF & _
" New UAC Value: 0x19811" & @CRLF & _
" User Account Control: " & @CRLF & _
" 'Don't Expire Password' - Disabled" & @CRLF & _
" User Parameters: -" & @CRLF & _
" SID History: -" & @CRLF & _
" Logon Hours: -" & @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