In using the following PowerShell Script with Regex.
THE PROBLEM: I don't get any data returned for the Filename.
CURRENT RESULTS IN POWERSHELL:
EXPECTED RESULTS IN POWERSHELL:
This Regex Demo is doing what I would think it should be doing in Regex. (Originating from this question.)
POWERSHELL SCRIPT:
$InStuff = @('111111_SMITH, JIM_END TLD 6-01-20 THR LEWISHS.pdf','222222_JONES, MIKE_G URS TO 7.25 2-28-19 SA COOPSHS.pdf')
switch -Regex ($instuff) {
'^(^.{0,6})*|(?!.*_).*(?=\.)'{
[pscustomobject]@{
EmployeeID = $matches.1
FileName = $matches.2
}
}
}
QUESTION: What do I need to change to get the filename to show up in the PowerShell results?

