#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^\(?([a-zA-Z]{1,4}[\)\.]|(XC|XL|L?X{0,3}|xc|xl|l?x{0,3})(IX|I?V|V?I{0,3}|ix|i?v|v?i{0,3})[\)\.]|([\dx]{1,3}\.){0,3}[\dx]{1,3})(?:[ \t]+)(\S.*)$"
Local $sString = "" & @CRLF & _
"Hello, world" & @CRLF & _
"1.1.1 Great dude" & @CRLF & _
"A) Awesome" & @CRLF & _
"That's it?" & @CRLF & _
"ix. Sweet" & @CRLF & _
"BBB. Hello" & @CRLF & _
"CC) t" & @CRLF & _
"D) ere" & @CRLF & _
"() ere" & @CRLF & _
"There is no way to know whether you are (i) a monkey, (ii) going to become a monkey, and (iii) will have a monkey." & @CRLF & _
"AB. Wrong!" & @CRLF & _
"Agreement, by the contractor" & @CRLF & _
"As, by" & @CRLF & _
"a, by" & @CRLF & _
"AAAA) b" & @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