Let's say I have a .csv file that looks a little like that:
"first_foo","first_foo"
"first_bar","first_bar"
"second_foo","second_foo"
"second_bar","second_bar"
And with a PS script I'd like to make it look like this:
"first","first_foo"
"first","first_bar"
"second","second_foo"
"second","second_bar"
I was thinking about using something like this:
$regex=[regex]"first*";
$regex.Replace('"first_foo","first_foo"',"first",1)
But it doesn't work. I'm new to powershell and don't use regex so often so I probably made noob mistakes... Do you guys have a solution?