i.e only to print the characters within |&|(within the pipes) and to replace all the blank space within pipe by 0.The number of chars within th pipe are constant and here it is 11.
Jotne and RudiC were confused because the original posting in this thread did not originally contain CODE tags. I have added CODE tags for you, but I agree with RudiC; the number of characters between the pipe symbols in your input lines is not a constant and is not 11 in any of your sample input lines. The number of characters between the pipe symbols is 12, 14, and 17 characters, respectively.
Replacing each space in your input with a "0" and adding a <newline> at the end produces the output:
$678.090780p000008.092780p36780000000000000
which is similar to, but certainly not the same as the output you said should be produced:
$678.09078p0008.09278p36780000000
The characters printed in red do not appear in what you say the output should be. I don't see a clear pattern to describe what spaces you want converted to zeros and what spaces you want to be deleted.