How to Extract below values from a text file?

Code and Charge codes.

Can you please send a random sample without real data (type any random text) so we can write our code based on that?

@Poorani_Ramachandran

  1. First use Read Text File activity to read the text from Text file and it will give output as String.

  2. And then use Generate DataTable activity and pass above string and select delimiter as Tab. This activity will give you output as DataTable.

  3. Then you use For Each Row activity to iterate one by one row and you can perform next steps with it.

1 Like

Sample Test File.txt (2.1 KB)

Hi, Attached is the sample file

I’m sorry for late reply.

Here’s the regex expression that you can use to extract the code:

and this one to extract the charge code: