cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with Stringreplace

former_member67937
Participant
0 Likes
460

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member67937
Participant
0 Likes

Sorry.

It was my fault. I was referencing the wrong variable after I dug deep into the code. Using the stringreplace with tab does work as it should.

Former Member
0 Likes

Does this make any difference?

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