Replace quotes in a string

Dear Community,

I have faced an error while replacing the double quotes for rows in a different data table columns. I have tried the following: “Output Data Table” → “Assign”: dt_string=dt_string.ToString.Replace("""","") which does not remove the quotes at all.

Could you suggest any other solution? Thanks in advance!

Kind regards,
Elmin

1 Like

Hi @Elmin_Safiyev_AZ,

You can use this instead of the " character in Chr(34).

Regards,
MY

hey

try this

dt_string = System.Text.RegularExpressions.Regex.Replace(dt_string, chr(34), "")

Regards!

have a look here:

Prepare dtCorrected as described:
dtCorrected = dtData.Clone

(From r In dtData.AsEnumerable
let ra = r.ItemArray.Select(Function (x) x.ToString.Trim.Replace("""","")).toArray()
Select dtCorrected.Rows.Add(ra)).CopyToDataTable()

Hi

Welcome to uipath forum

There are many options to handle this

  1. Use a assign activity and regular expression like this

output = System.Text.RegularExpressions.Regex.Replace(your_String,"(“|”|")","")

  1. Use a simple replace method like this
    In assign activity

varStr.Replace(ChrW(&H2018), String.Empty).Replace(ChrW(&H2019),String.Empty).Replace(ChrW(&H201C),String.Empty).Replace(ChrW(&H201D), String.Empty)

Cheers @Elmin_Safiyev_AZ