#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^\d+((,\d)?(-(\d+)?(,\d)?)?)?$"
Local $sString = "13,4" & @CRLF & _
"5,66876876" & @CRLF & _
"13,4-15,6" & @CRLF & _
"4-5" & @CRLF & _
"5" & @CRLF & _
"45" & @CRLF & _
"34,534" & @CRLF & _
"13,7-14" & @CRLF & _
"14-15,6" & @CRLF & _
"14-15,67" & @CRLF & _
"1,236" & @CRLF & _
"14,5-15" & @CRLF & _
"15-16,5" & @CRLF & _
"4,5-16,76" & @CRLF & _
"100,4" & @CRLF & _
"100,45" & @CRLF & _
"100,45-100,4" & @CRLF & _
"100,4-100,54" & @CRLF & _
"100,5-123323,5"
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