-
-
Save vexx32/824cb519f6cc6d0f3486233753362919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For testing only; replace $lines with Get-Content $File | |
$lines = @" | |
Name1=nameHere Value= | |
Name2=nameHere Value=someValue | |
"@ -split '\r?\n' | |
$KeyValuePairs = $lines | ForEach-Object { | |
if ($_ -match '^Name[0-9]+=(?<Name>.*?) Value=(?<Value>.*?)$') { | |
$matches.Remove(0) | |
$matches.Clone() | |
} | |
} | |
$KeyValuePairs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment