I have a script that creates an XML file from a flatfile (pipe delimited). I have this little snippet in there to remove space and replace || with |0| (the zeros have to be there). There seems to be times that if I have a pipe follwed by more than one space it won't replace with the zero...can anyone see where I'm going wrong here?