Issue using regex

image

Example, I have used screenscsraping , and it has scraped the the balance amount.
However for few cases Due $500.00, for few its CHF28,8,8890.95.

So how do i extract the text only. Note my numbers have decimals and comma.

image

Do you import System.Text.RegularExpressions

I could overcome the issue.
However, how do i handle the decimal and comma.
Currently the output i get is

image

for
image

v1 = “2,335.00.”

assign v1 = v1.Replace(",","")
assign v1 = v1.Replace(".","")

Result 233400

Rounding?
I want the exact amount like above example : 28,699.95 = 28699.95.
I need to extract the amount from PDF and then compare the same with Excel.

Reconciliation of Invoice due amount.

than use only this code assign v1 = v1.Replace(",","")

Hi @Mallika

Could you specify what is the input string for the processing? If the question is about cleaning up the result, see @indra’s answer. If you need to extract the price from a longer string, you can use the following regex:
(?<=CHF|$).+

See here for reference:

Also, the rounding is not the case in the previous answer, it’s a simple find-replace. I believe it is a simple typo in the number :slight_smile:

"CHF28,8,8890.95".Replace(",","")
This line will replace all the commas with a blank, with this result: CHF2888890.95