How to match the last number in a row with uipath matches activity?

Hi :slight_smile: ,

I would like to match the last value from each row from a PDF file with matches activity - in a loop.


The pattern is “quit simple”, but if i apply this pattern in UiPath (Matches activity), it doesn’t work.

ps.: 2019 in the beginning is just an example, a variable will be there

can you somehow attach here your workflow?
I have created your process in my Studio, and everything is working fine with this pattern.
This is the output I manage to create. It’s: each line and boolean indicating if Regex match was found.

Dear olgu,

Thank you very much in advance for your cooperation in this regard. To be honest, my main problem is that I can’t use the previously tested pattern in UiPath.

My Workflow:

  • Read PDF Text
  • Matches
  • Assign the Matches result to a variable
  • Write line (for testing purpose…)!
    What do you think?

Are you using inside of RegEx Builder in UiPath, “Any(0 or more)” in Quantifiers column?

Please try to split the input text from PDF by the New Lines, and then for each line: check the pattern.

1 Like

I used an old version of UiPath, with 2019.4.4 there is no problem with the original pattern, works as expected :smiley:. thanks for your cooperation, again. ("(?<="+item.ToString.Trim+".*)([0-9.,-]+($)?)\n").ToString

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