Remove Pipe-Delimiters from Text File


I have created a script to insert the pipe-delimiters in text file, the purpose for that is search in text file which is successful, now i want to restore it back to its original text file with removing all pipe delimiters inserted.
Is there a simple way to remove all the pipe delimiters in a single go.

Thanks in advance.

Something like this should do the trick:

(Get-Content .\file.txt) -replace '\|' | Set-Content .\file.txt


Thanks, so simply and faster, Amazing.

Thanks a lot.