Get path (windows style) from any type of text (error message, e-mail corps ...), quoted or not.
THIS IS THE SINGLE LINE VERSION ! If you want understand how it work or edit it, go https://regex101.com/r/7o2fyy
$powershellRegex = @' [Put here the regex to replace (?&CapturGroupName) with \k<CapturGroupName>] '@ -replace '\(\?&(\w+)\)', '\k<$1>'
This example code must return :
[Put here the regex to replace \k<CapturGroupName> with \k<CapturGroupName>]