#Multiline powershell regex with variable extraction.
$data = @”
first
second
third
“@
$data | Select-string -Pattern “(?s)first(?.*)third” | select -ExpandProperty Matches | foreach { $_.Groups[“name”].Value}
Random outpourings of a software developer
#Multiline powershell regex with variable extraction.
$data = @”
first
second
third
“@
$data | Select-string -Pattern “(?s)first(?.*)third” | select -ExpandProperty Matches | foreach { $_.Groups[“name”].Value}