Not able to extract data after performing regular expression

I need to extract data from pdf and need to write it in to excel, for that
1.I read that pdf using read pdf text activity and write it in to a txt file.
2.Then after I provided regular expression and created a variable OpVar, then i created an if condition OpVar. Any().and pass that variable to for each, but I’m not able to extract data… when I put message box inside the for each its coming as empty.

Hi @Chippy_Kolot

It would be convenient for us to provide the solution if you could share sample input and output.


Could you please paste the text file here?

And also mention which data you’re trying to extract?

we can extract the specific data using RegEx…


Sample_data.txt (312 Bytes)

This is the sample data,. I’m sorry that I cant post exact data here.
Similar txt file i got after reading the pdf using read pdf text activity, and write in to txt file.
DataNo, DataSummary,Number,Records,Expanded,Sum
These are the fields available in the pdf .
for this data I provided regex as (\d\w{6,7}-\d{2})+.
And this is provided in matches and and stored it in a variable.(OpVar)
Then I provided and if condition Opvar.Any().in then case provided for loop and passed that variable .then provided a message box to get the datas extracted.

Hey! @Chippy_Kolot ,

Could you please show us the expected output?

If you’re trying to push this data to data table…

we can use Generate DataTable activity…

The separator is Space…

Will generate the data as it is…


In excel it should be written as
123456 FDFGHYHJJKKKKLLLLLLC 1 1, 1,234.05 2345.3 2345.34
798541 GFGFGHJKJHFVHHGFHJHK 2 1,5852.10 4560 4560
3453251-01 FDGHMJHFJFJHHVVV 3 25367 2314 2314
2345643CL21 RHJTJHKIKHHJJJJ 4 4772.5 4582 4582
AB12344-123 TJIKXDFGHJNNGTDCH 2 2342.9 1232 1231

Yes… We can do that by using Generate data table…

Try this and let me know…


Find the attached screenshots…

  1. Process screenshot…

  1. Output screenshot…

Then use write range and pass the Generate data table output


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