#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^((?'EMPTY'(""))|'(?'recipe'(\s*recipe\[\w+::\w+@((?'MAJOR'(?:0|(?:[1-9]\d*)))\.(?'MINOR'(?:0|(?:[1-9]\d*)))\.(?'PATCH'(?:0|(?:[1-9]\d*))))],*\s*))+')$"
Local $sString = """" & @CRLF & _
""" <-- Empty" & @CRLF & _
"'recipe[COOKBOOK::RECIPE_NAME@1.0.0],recipe[COOKBOOK::RECIPE_NAME@1.0.0],recipe[s::s@1.0.0]'" & @CRLF & _
"'recipe[COOKBOOK::RECIPE_NAME@1.0.0]'" & @CRLF & _
"'recipe[COOKBOOK::RECIPE_NAME@1.0.0], recipe[COOKBOOK::RECIPE_NAME@1.0.0]'" & @CRLF & _
"'recipe[COOKBOOK::RECIPE_NAME@11.10.10], recipe[COOKBOOK::RECIPE_NAME@11.10.10]'" & @CRLF & _
"'recipe[COOKBOOK::RECIPE_NAME@11.10.10]'" & @CRLF & _
"'recipe[cookbook::recipe]'" & @CRLF & _
"'recipe[somestring]'" & @CRLF & _
"'recipe[cookbook@1.0.0]'" & @CRLF & _
"'recipe[cookbook::recipe_name@1.0.0]'" & @CRLF & _
"'bsad'" & @CRLF & _
""
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