#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(.*(?<=\\))?+(.*$|$)"
Local $sString = "C:\Path1.Ext1\File1.v1.Ext1" & @CRLF & _
"C:\Path2.Ext2\File2.Ext2" & @CRLF & _
"C:\Path3.Ext3\File3." & @CRLF & _
"C:\Path4.Ext4\File4" & @CRLF & _
"C:\Path5.Ext5\.Ext5" & @CRLF & _
"File6.v1.Ext6" & @CRLF & _
"File7.Ext7" & @CRLF & _
"File8." & @CRLF & _
"File9" & @CRLF & _
".Ext10" & @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