#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "v(?:\s+(\-?\d+(?:\.\d+))?){3,4}"
Local $sString = "# cube.obj" & @CRLF & _
"#" & @CRLF & _
"" & @CRLF & _
"g cube" & @CRLF & _
"" & @CRLF & _
"v 0.0 0.0 0.0" & @CRLF & _
"v 0.0 0.0 1.0" & @CRLF & _
"v 0.0 1.0 0.0" & @CRLF & _
"v 0.0 1.0 1.0" & @CRLF & _
"v 1.0 0.0 0.0" & @CRLF & _
"v 1.0 0.0 1.0" & @CRLF & _
"v 1.0 1.0 0.0" & @CRLF & _
"v 1.0 1.0 1.0" & @CRLF & _
"" & @CRLF & _
"vn 0.0 0.0 1.0" & @CRLF & _
"vn 0.0 0.0 -1.0" & @CRLF & _
"vn 0.0 1.0 0.0" & @CRLF & _
"vn 0.0 -1.0 0.0" & @CRLF & _
"vn 1.0 0.0 0.0" & @CRLF & _
"vn -1.0 0.0 0.0" & @CRLF & _
"" & @CRLF & _
"f 1//2 7//2 5//2" & @CRLF & _
"f 1//2 3//2 7//2" & @CRLF & _
"f 1//6 4//6 3//6" & @CRLF & _
"f 1//6 2//6 4//6" & @CRLF & _
"f 3//3 8//3 7//3" & @CRLF & _
"f 3//3 4//3 8//3" & @CRLF & _
"f 5//5 7//5 8//5" & @CRLF & _
"f 5//5 8//5 6//5" & @CRLF & _
"f 1//4 5//4 6//4" & @CRLF & _
"f 1//4 6//4 2//4" & @CRLF & _
"f 2//1 6//1 8//1" & @CRLF & _
"f 2//1 8//1 4//1"
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