回答編集履歴
1
正規表現パターンを修正
answer
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
パイプで`%` (`ForEach-Object`)に渡して置換させる。
|
2
2
|
|
3
3
|
```PowerShell
|
4
|
-
Select-String -Path .\test.log -Pattern "ch_upd_user_nm=*company*" | % { $_ -replace "^.*(?=ch_upd_user_nm)","" }
|
4
|
+
Select-String -Path .\test.log -Pattern "ch_upd_user_nm=.*company.*" | % { $_ -replace "^.*(?=ch_upd_user_nm)","" }
|
5
5
|
```
|