#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "^\s*:\s*$"
Local $sString = "0" & @CRLF & _
"0.0 // less than lower bound" & @CRLF & _
"0.19 // fraction part is 2 digits, right '9' is extra" & @CRLF & _
"94.11-2.32 // fraction part is 2 digits, right '1' is extra" & @CRLF & _
"999.90 // fraction part is 2 digits, '0' is extra" & @CRLF & _
"9.0 // should be 9 or 9.1, 9.0 is wrong" & @CRLF & _
"1000" & @CRLF & _
"" & @CRLF & _
"0.1" & @CRLF & _
"1.1" & @CRLF & _
"55.5" & @CRLF & _
"999.9" & @CRLF & _
"" & @CRLF & _
"2.0:2.2" & @CRLF & _
":a" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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