#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?=-.*D$|\d.*C$)-?(?=(?:\d,?){1,13}\.)(?:0|[1-9]\d{0,2}(?:,\d{3})*)\.\d{2} [DC]$"
Local $sString = "-0.48 D" & @CRLF & _
"-1.00 D" & @CRLF & _
"-2,000.00 D" & @CRLF & _
"-100,000.56 D" & @CRLF & _
"-100,000.00 D" & @CRLF & _
"-1,123,456.43 D" & @CRLF & _
"-1,123,456,000,000.43 D" & @CRLF & _
"-10,123,456,000,000.43 D" & @CRLF & _
"-1,123,456.43 C" & @CRLF & _
"-3,000,62.45 D" & @CRLF & _
"-03,000.45 D" & @CRLF & _
"-.23 D" & @CRLF & _
"" & @CRLF & _
"0.23 C" & @CRLF & _
"1.00 C" & @CRLF & _
"2,000.00 C" & @CRLF & _
"100,000.56 C" & @CRLF & _
"100,000.00 C" & @CRLF & _
"1,123,456.43 C" & @CRLF & _
"1,123,456,000,000.43 C" & @CRLF & _
"10,123,456,000,000.43 C" & @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