I want to extract file1, file2 I know how to do this in javascript, I'm lost in Powershell, I can only extract the whole second match following that tut https://devblogs.microsoft.com/scripting/regular-expressions-regex-grouping-regex/, what's the syntax ?
$regex = '(.+\\)*(.+)\.(.+)$'
$data = @'
"C:\test\file1.txt"
"C:\test\file2.txt"
'@
[RegEx]::Matches($data,$regex).value