#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?'Vmid'\d+)(\s+)((?'Name'\S.+\S)?)(\s+)(?'Datastore'\[\S+\])(\s+)(?'File'.+\.vmx)(\s+)(?'GuestOS'\S+)(\s+)(?'Version'vmx-\d+)(\s*?)((?'Annotation'\S.+)?)$"
Local $sString = "Vmid Name File Guest OS Version Annotation " & @CRLF & _
"10 X9SRI-3F-W10P-EN-MEDIA [EVO860_500GB] VM/X9SRI-3F-W10P-EN-MEDIA/X9SRI-3F-W10P-EN-MEDIA.vmx windows9_64Guest vmx-14 " & @CRLF & _
"5 PPB Local_Virtual Machine_v4.0 [EVO860_500GB] VM/PPB-Local_Virtual-Machine_v4.0/PPB Local_Virtual Machine_v4.0.vmx centos64Guest vmx-11 PowerPanel Business software(Local) provides the service which communicates" & @CRLF & _
"with the UPS through USB or Serial cable and relays the UPS state to each Remote on other computers" & @CRLF & _
"via a network." & @CRLF & _
"It also monitors and logs the UPS status. The computer which has been installed the Local provides" & @CRLF & _
"graceful," & @CRLF & _
"unattended shutdown in the event of the power outage to protect the hosted computer." & @CRLF & _
"15 X9SRI [-] 3F-W10P-EN-MEDIA [EVO860_500GB] VM/X9SRI-3F-W10P-EN-MEDIA/X9SRI-3F-W10P-EN-MEDIA.vmx windows9_64Guest vmx-14 " & @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