次のような .csv ファイルがあるとします。
"first_foo","first_foo"
"first_bar","first_bar"
"second_foo","second_foo"
"second_bar","second_bar"
そして、PSスクリプトを使用して、次のようにしたいと思います。
"first","first_foo"
"first","first_bar"
"second","second_foo"
"second","second_bar"
私はこのようなものを使用することを考えていました:
$regex=[regex]"first*";
$regex.Replace('"first_foo","first_foo"',"first",1)
しかし、うまくいきません。私はpowershellに不慣れで、正規表現をあまり使用しないので、おそらく初心者の間違いを犯したでしょう...解決策はありますか?