#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^([a-zA-Z0-9]*[a-zA-Z]+[a-zA-Z0-9]*\.[a-zA-Z0-9]*\.[a-zA-Z0-9]*|[a-zA-Z0-9]*\.[a-zA-Z0-9]*[a-zA-Z]+[a-zA-Z0-9]*\.[a-zA-Z0-9]*|[a-zA-Z0-9]*\.[a-zA-Z0-9]*\.[a-zA-Z0-9]*[a-zA-Z]+[a-zA-Z0-9]*)(~|\-|\+){0,1}[a-zA-Z0-9]+$"
Local $sString = "//good" & @CRLF & _
"rc0.05.00" & @CRLF & _
"0rc.05.00" & @CRLF & _
"0.rc05.00" & @CRLF & _
"0.05rc.00" & @CRLF & _
"rc0.rc05.00" & @CRLF & _
"rc0.05rc.00" & @CRLF & _
"rc0rc.rc05.00" & @CRLF & _
"rc0.rc05rc.00" & @CRLF & _
"rc0.rc05rc.rc00" & @CRLF & _
"rc0.rc05rc.00rc" & @CRLF & _
"" & @CRLF & _
"0.0.0sr1+asdf" & @CRLF & _
"0.0.0sr1" & @CRLF & _
"errhand.LSD.asdf+dfsg" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"//bad" & @CRLF & _
"1.1" & @CRLF & _
"1.1.1" & @CRLF & _
"1.00.00" & @CRLF & _
"v1c.1." & @CRLF & _
"1.v1c." & @CRLF & _
"1.01.01~sdgf" & @CRLF & _
"1.v1c.asdf-sadf+asdf" & @CRLF & _
"~1c.1c.0" & @CRLF & _
"1c.1~c.0"
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