#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<preRelease>(?:[a-zA-Z1-9][a-zA-Z\d]*|0\d*[a-zA-Z][a-zA-Z\d]*|0)(?:\.(?:[a-zA-Z1-9][a-zA-Z\d]*|0\d*[a-zA-Z][a-zA-Z\d]*|0))*))?(?:\+(?<metadata>(?:[a-zA-Z\d-]*)(?:\.(?:[a-zA-Z\d-]*))*))?$"
Local $sString = "0.1.0" & @CRLF & _
"01.2.1" & @CRLF & _
"1.2.0" & @CRLF & _
"1.0.0" & @CRLF & _
"1.01.0" & @CRLF & _
"1.0.01" & @CRLF & _
"1.0.0-0df34.ahgdfhsdf.0005a56tg" & @CRLF & _
"1.0.0-0054.df4gf" & @CRLF & _
"1.0.0-005a4.df4gf" & @CRLF & _
"1.0.0-005a4.df4gf+adffbff.sdfg.sdfg.adf78df7d8df7" & @CRLF & _
"1.0.0-005a4.df4gf+adffbff.sdfg.sdfg.00000000.dfsg.sdf-sfg.sdfg-sdfg.sgf" & @CRLF & _
"900.10.85494" & @CRLF & _
"0900.10.54"
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