How to extract data and write in to seperate cells

~ABC-CHARGES~12,310.10
~Out data extraction credit~(1,200.00)
~CHARGES~CDE~1,234.80
This is the sample data I’m getting after performing regex. But it is coming all together, We need above data in seperate line .Can anyone help me to solve this issue.

HI @Chippy_Kolot

Can you share the Output for the above input text?

Regards
Gokul

Hello @Chippy_Kolot

Do you want to separate data with ~ and write each line to a separate column?

You can watch the below video to do that. If the requirement is different please share the input file and the output file required.

you can use Text to column activity or Generate datatable activity.

test.txt (111 Bytes)
(?<=Primary:).*(?=~SUB-TOTAL)
I used this regex in matches activity. we used single line flag.

Hi @Chippy_Kolot

How about expression?

System.Text.RegularExpressions.Regex.Match(YourString,"(?s)(?<=Primary:)(.*)(?=~SUBTOTAL)").Tostring

image

image

Regards
Gokul

Arr_Str(Array of String)=YourOutputVariable.Split(Environment.Newline.TocharArray,StringSplitOptions.RemoveEmptyEntities)

if you want 1st line
Line1(String)=Arr_Str(0)

Follow Same For the Remaining Lines.

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