#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "([£€$])?(?=(\d{1,3}(?:,\d{3})*(?:\.\d+)?(?![\d.,])(?:\s*(?:[tTbB]n|m|(?:[tT]r|[bBmM])illion)\b)?)(\s*(?:[pP](?:ence)?|[cC](?:ents?)?|€|[eE]uros?|[dD]ollars?|[pP]ounds?)\b)?)(?(1)\2(?!\3)|(?<![£€$])\2\3)"
Local $sString = "$1 dollar ✘" & @CRLF & _
"1 ✘" & @CRLF & _
"$1 tn dollars ✘" & @CRLF & _
"$1,00000.000,000 ✘" & @CRLF & _
"1,000.00 ✘" & @CRLF & _
"" & @CRLF & _
"$1 ✓" & @CRLF & _
"1 pence ✓" & @CRLF & _
"1 cent ✓" & @CRLF & _
"1 euro ✓" & @CRLF & _
"1 dollar ✓" & @CRLF & _
"1 pound ✓" & @CRLF & _
"$1 tn ✓" & @CRLF & _
"$1 trillion ✓" & @CRLF & _
"1 trillion dollars ✓" & @CRLF & _
"$1,000,000,000,000 ✓" & @CRLF & _
"$1.000 ✓" & @CRLF & _
"$1,000,000,000,000.000000 ✓" & @CRLF & _
"" & @CRLF & _
"This sentence is worth 1 dollar, at least. More likely $2 or $3."
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