Hello! I am reading in PDF data and need to pick out a specific value from a block of text. The value is static in it’s position within the block no matter what page I read in, however, the amount of characters is dynamic. The block of text I am working with is as follows:
Writing to a text file:
Residue mmbtu 3,787.11 100.00% 3,787.11 $1.623163 $6,147.10 Total 3,787.11 3,787.11 $6,147.10
From UiPath message:
Residue mmbtu 3,787.11 100.00% 3,787.11 $1.623163 $6,147.10 \r\nTotal 3,787.11 3,787.11 $6,147.10 \r\n
I am trying to pull out the second dollar amount so in this example I should get 6,147.10 as an answer.
Using a regex expression generator (https://regexr.com/) I am able to pull the value out successfully using the expression: (?<=$)\S+|(?<=\$)\S+
However, when I try it in UiPath by assigning a variable to the code: system.Text.RegularExpressions.Regex.Match(str_ResVolAmt,"(?<=$)\S+|(?<=\$)\S+ ").ToString, no value is pulled out.