I want to find regex string in a txt file, replace it with other regex string and output it to new txt file. I wanna use powershell commands in cmd (batch file).
Now I do this, it works, but can't add new line:
set Test1=.\Test1.txt
powershell -command "& {Get-ChildItem .\LogFULL.txt | Get-Content | Foreach-Object {$_ -replace '\[\+\]PS PLUS:', 'PS PLUS: ' -replace '\[\+\] Country', 'Region' -replace '================TRANSACTIONS================','----- Games -----' -replace '================TRANSACTIONS END============','-----\r\nPlay Time\: 20 Minutes--------------------'}} | Set-Content -encoding Default .\Test1.txt"
I tried different ways like `r`n or adding and removing -raw, -r, foreach and etc but can't handle it.
\"-----`r`nPlay Time: 20 Minutes--------------------\"