#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=\w{7}\s\[)[^\]]+"
Local $sString = " fifthrelease 566091c changes to labranges] (3rd revision) loaded" & @CRLF & _
" firstrelease 4a56940 [origin/firstrelease] change priority to 1100 for all OpenQuery DVPs" & @CRLF & _
" fourthrelease 2875c7b [origin/fourthrelease] all DVPs loaded (including new formulas); rev 21 CRF" & @CRLF & _
" main 566091c [origin/main] changes to labranges (3rd revision) loaded" & @CRLF & _
" secondrelease ff35618 [origin/secondrelease] fixed double SAE mail generated by AE_09" & @CRLF & _
"* sixthrelease 440478f [origin/sixthrelease] 4th lab revision processed and loaded" & @CRLF & _
" thirdrelease e3d7038 [origin/thirdrelease] LabRanges loaded"
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