Reading Text File as a String Variable and STRUCTURING THE TEXT

Hi Team,

So I am in the middle of the module where I am having the text file which has the data as shown below:-

INPUT:-

OUTPUT:-

EXPLAINATION:-
Please note the following points-

  1. As you see, there is data on each line which is separated by “|” sign.

  2. If you look at it closely, data is there in the tabular manner.

  3. It is fixed that on each row, there must be 15 “|” signs (ie: There must be 16 fields)

  4. But as I have shown in the input screenshot, there are times where data is moved to the next line

  5. I need to handle that and move it to the previous line as shown in the Output Screenshot.

REQUIRED APPROACH:
I want to use following approaches:

  1. I want to use the string manipulation or regex to acknowledge 15 “|” signs and Structure it exactly as shown in Output Screenshot.

  2. I want to have output such that, on every line I have 15 “|” signs (ie: 16 fields).

I hope you are getting the exact intentions.

Please get back to me at the earliest. It is an urgent need.

Thanks and Regards,
@hacky

1 Like

Experts : @Pradeep_Shiv, @Palaniyappan, @supermanPunch

Please look into it.

1 Like

Can you upload a sample of the text file.

It will save creating a genuine mockup file

2 Likes

Hi @hacky,

Please find the solution for your requirement.Let me know if you have any issues.

Processusvierge.zip (840.4 KB)

Regards,
Omkar P

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.