#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^[-\w]+:\s*(?:(?!(?:ed|ing)\b)\w)+\b.+"
Local $sString = "MAINT: Refactor something" & @CRLF & _
"STRY-1: Add something" & @CRLF & _
"STRY-2: Update something" & @CRLF & _
"" & @CRLF & _
"But should not match the following:" & @CRLF & _
"" & @CRLF & _
"MAINT: Refactored something" & @CRLF & _
"STRY-1: Added something" & @CRLF & _
"STRY-2: Updated something" & @CRLF & _
"" & @CRLF & _
"MAINT: Refactoring something" & @CRLF & _
"STRY-3: Adding something" & @CRLF & _
"STRY-4: Updating something"
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