Text to Left/Right ending at the end of a line

I am trying to get a dollar amount of out my document. I use a read PDF and then i want to find the dollar amount to store as a variable.

I am using the Text to Left/Right and as the separator I put $. This correctly finds the $ and gives me everything to right, however it pulls in the entire rest of the document. I would like for it to give me everything tp the right but end at the line break. How would I do this?

This is my activity:
image

This is the result (the arrow is where I want it to end):
image

Hello @atarantino ,

You can use the regex ([$])\w+ to get only the required value.

You can use Matches activity and inside the regex you can put this expression. Then it will give you the output.

or you can use this expression in a assign activity. strInput is the input string.

System.Text.RegularExpressions.Regex.Match(strInput, “([$])\w+”).Value

Thanks @Rahul_Unnikrishnan

So that expression works until the comma in the amount. How would I get the entire amount?

use the below expression

([$]\d+[,])\w+

This is awesome. Thanks a lot.

1 Like

You can use the below as well if there are dots coming in.

[$0-9_,.0-9-]\d+

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