#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "^(([1-4][/][1-4])*)(([,][1-4][/][1-4])*)(([1-4])*)(([,][1-4])*)$"
Local $sString = "4/1,6/5,6/1,1,2,3,4,5" & @CRLF & _
"5,4,3,2,1,1/3,4/4,2/5" & @CRLF & _
"2,5,3,2,1,1/3,4/4,2/5asdf" & @CRLF & _
"1asdf" & @CRLF & _
"4/1" & @CRLF & _
"2/3,1,2,3" & @CRLF & _
",2/3,1,2,3" & @CRLF & _
"2/3,1,2,3,4,5" & @CRLF & _
",2/3,1,2,3,4,5" & @CRLF & _
"5,2/3,1,2,3" & @CRLF & _
"4/1,2/3,1,2,3,4,5" & @CRLF & _
"1/4,2/3,1,2,3,4,5"
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