Get All Occurrences Of Text With A document String

I am using the Read PDF activity which is a report of multiple involices. I need to pull all the occurrences of the Total Amounts from each invoice. I have figured out how to get the first invoice amount, but not the others within the same report. I tried using “For Each” but it did only returned the first amount multiple times.

I’m very new to RPA and trying to get an understanding of how the For Each works when working with text data.

Please follow below steps-

  1. Use Read PDF activity to read the content of PDF file.
  2. Create a regular expression matching the Data you would like to retrieve. (eg., Total 456.34 => (Total \d+.\d+))
  3. Use Matches activity by providing the data from (1) and the regular expression (2). The output of this activity will be IEnumerable
  4. Loop through each resultant Match and do the required data manipulation.