回答編集履歴

1

正規表現パターンを修正

2021/09/16 02:23

投稿

Daregada
Daregada

スコア11990

test CHANGED
@@ -4,6 +4,6 @@
4
4
 
5
5
  ```PowerShell
6
6
 
7
- Select-String -Path .\test.log -Pattern "ch_upd_user_nm=*company*" | % { $_ -replace "^.*(?=ch_upd_user_nm)","" }
7
+ Select-String -Path .\test.log -Pattern "ch_upd_user_nm=.*company.*" | % { $_ -replace "^.*(?=ch_upd_user_nm)","" }
8
8
 
9
9
  ```