Author Posts

October 26, 2014 at 6:15 am

Hi,

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.

October 26, 2014 at 10:48 am

Something like this should do the trick:

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

October 26, 2014 at 12:59 pm

Hi,

Thanks, so simply and faster, Amazing.

Thanks a lot.