#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?:(?<!\.)\b(?:0|[1-9]\d{0,2}|[1-3]\d{3}|4[0-6]\d{2})\b(?:\.\d+)?)|(?<!\.)\b4700(?!\.)\b"
Local $sString = "0" & @CRLF & _
"11" & @CRLF & _
"222" & @CRLF & _
"3333" & @CRLF & _
"4444" & @CRLF & _
"4700" & @CRLF & _
"4701" & @CRLF & _
"9999" & @CRLF & _
"47000" & @CRLF & _
"0000000" & @CRLF & _
"49" & @CRLF & _
"99" & @CRLF & _
"0.11111" & @CRLF & _
"000.2122" & @CRLF & _
"4700.111111" & @CRLF & _
"The 4700" & @CRLF & _
"" & @CRLF & _
"01" & @CRLF & _
"000.11111" & @CRLF & _
".1111" & @CRLF & _
"1.4700" & @CRLF & _
".4700"
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