This is assuming that the trailling pipe at the end of your first line of desired output is a typo.
Update: Too slow :-) Also, toolic's reply nudged me to remove the unnecessary escape in the replacement string.
In reply to Re: how to remove empty pipe delimiters in a line which doesn't contain any data
by hippo
in thread how to remove empty pipe delimiters in a line which doesn't contain any data
by rpinnam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |