#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^([\w]+)\s(.*?)(?=\(|incl\.|[A-Z]$)(?:\(([a-zA-Z]+)-?(.*?)\))?(?:.*(incl.*))?([A-Z])$"
Local $sString = "Branded 16 ft Box Truck (Entrent - Avalen Owned) incl. New DSP Insurance PaymentP" & @CRLF & _
"Branded Extended Van (Entrent - Avalen Owned) incl. New DSP Insurance PaymentR" & @CRLF & _
"Branded Custom Van (Entrent - Avalen Owned) incl. New DSP Insurance PaymentR" & @CRLF & _
"Branded Custom Delivery Van (Entrent -Avalen Owned) incl. New DSP" & @CRLF & _
"Branded Extended Van (CeasePlan - Avalen Owned)R" & @CRLF & _
"Branded Extended Van (Entrent - Avalen Owned)R" & @CRLF & _
"Owned Van incl. New DSP Insurance PaymentP" & @CRLF & _
"Rental Van (Unbranded CSP)R" & @CRLF & _
"Owned 16ft Box TruckR" & @CRLF & _
"Branded 24ft Box Truck (Entrent - Leased)P" & @CRLF & _
"Leased Van incl. New Csp Insurance PaymentR"
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