How to fetch only the value from the string leaving behind currency symbols

Case 1
input - $125.00 (USD)
Expected output - 125.00

Case 2
Input - $ 125.00
Expected output - 125.00

Currency symbol can be from other countries aswell. please help me

@tharani.natarajan
System.Text.RegularExpressions.Regex.Replace(“string_Variable”,“\D”,“”)

Check following strategy if possble:
grafik

@tharani.natarajan Use Regular Expression like below

                            Assign str_variable = System.Text.RegularExpressions.Regex.Match(ur_variable,"(\d+[.])").ToString

can you check the expression .It shows error

hi …can u please help in which activity we need to give this?

@tharani.natarajan

Updated here please check System.Text.RegularExpressions.Regex.Match(ur_variable,“(\d+[.])”).ToString

Hi @tharani.natarajan

Checkout this expression

System.Text.RegularExpressions.Regex.Match("InputString","\d+.\d+").ToString

image

You need to give like this
image

Regards
Sudharsan

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum