Identifying digits inside apostrope

Can someone help me solve this particular problem,

This is the given string:
image

I want answer in this form:
image

@Hardik_Durgam
Inputstring.replace({“”“,”,“},”") try this

1 Like

Hi @Hardik_Durgam ,

If you wish to specifically target digits, then you can use this regex pattern to get the job done:

image

image

//adding extra quote to escape character
System.Text.RegularExpressions.Regex.Replace(str_variable,"((?<=\d)"")|(""(?=\d))",String.Empty)

RemoveQuotes.xaml (5.1 KB)

Kind Regards,
Ashwin A.K

1 Like

Hey, thanks for the simplified solution. I have to do a few more steps to it, like

  1. Removing the commas present in the digits
  2. Removing the “.” (dot) in the digits
  3. Removing recurring 0’s after the “.”(dot)

Hi @Hardik_Durgam ,

When you say that you want to remove the dot, did you mean to say that you wanted to round it up like so?

99060.00 -> 99,060
74.5564000 -> 74

Kind Regards,
Ashwin A.K

Not exactly rounding up,

  1. For 74.5564000 I want the result as 74.5564 (0’s occuring multiple times should not be displayed)

  2. For 99060.00 I want the result as 99060

I hope I am able to make you understand.

Hi @Hardik_Durgam ,

Using regex for this gets quite tricky, but here you go:

image

RemoveQuotes_v1.xaml (8.2 KB)

Kind Regards,
Ashwin A.K

1 Like

Thanks a lot for your help!!

Regards,
Hardik Durgam

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