How to split amount of USD

hi,
i am using get text text activity in web.
getting output like–>USD 39,330.00
2. USD 7,486.00

i want to data like -->39330 , 7486 without commas,

can anyone help ?

Hi @Anand_Designer

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=USD\s)\d.+").Tostring

image

Regards
Gokul

1 Like

Another method

Split("USD 39,330.00","USD")(1)

image

Regards
Gokul

Hi @Anand_Designer

You can also use this method.

image

set getnum to integer type

Hi @Anand_Designer
use in assign activity
string b= System.Text.RegularExpressions.Regex.Replace(“string_Variable”,“\D”,“”)

1 Like

@Anand_Designer
Try this

String-> cint((System.Text.RegularExpressions.Regex.Match(YourString,"(?<=USD\s)\d.+").Tostring).Replace(",","")).ToString

Integer-> cint((System.Text.RegularExpressions.Regex.Match(YourString,"(?<=USD\s)\d.+").Tostring).Replace(",",""))

image

1 Like

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