Skip to Content
0
Feb 26, 2010 at 04:16 PM

Issue with Stringreplace

121 Views

I am loading an ASCII file using Text Loader, and then I parse it using Flat File Parser. I repeat through each line, and I want to remove leading spaces including tabs, so I use this to replace tabs:

stringtrim(stringreplace(repFileParse.Output{/Row/Line}, tab, " "))

And it doesn't work. It keeps the tabs there. I can confirm this by using stringlength. However, if I do this command:

stringtrim(stringreplace(tab & tab & "ABC" & tab & "DEF", tab, " "))

I confirm that the tabs are replaced with spaces, and the stringlength is as it should be.

Is there a work around for this? I was thinking there would be a CHR or ASCII command to use instead of "tab" for the stringreplace function, but I haven't found one yet.

We are running xMII 11.5.

Thanks,

Todd