Hi team run time I need add "," in my string

Hi team,

I’m fetching from excel value in string =“$30000 - $50000” like this but run time i need output as output value =“$30,000 - $50,000”

can you any kindly help me.

Thankyou

Hi @Kutchu_Umakanth

Can you please try to use below expression

System.Text.RegularExpressions.Regex.Replace(inputString, "\$([0-9]+)", Function(m) "$" & Double.Parse(m.Groups(1).Value).ToString("N0"))

Hi @Kutchu_Umakanth,

You could follow the steps below. If I helped you, please mark it as solved.

This image shows a sequence of actions in a workflow automation software where variables are assigned and then displayed in a message box. (Captioned by AI)

Hire is the UiPath Project:
Main.xaml (9.4 KB)

@Kutchu_Umakanth

Welcome to the community…you can try this

Str = String.Format("${0:n0}-${1:n0}", str.split({"-"},Stringsplitoptions.None).First.Replace("$","").Trim, str.split({"-"},Stringsplitoptions.None).Last.Replace("$","").Trim)

Here str is your input string

Cheers