How to use replace for double quotes

Hi Everyone ,

My requirement is i need to replace the different types of double quotes

“ - “
” - ”
" - &quot

i have to replace these garbage values with quotes

eg: row1(“Col0”).Tostring.Replace("”",""") i am getting error for this @Palaniyappan @Gokul001 please help

Thanks in advance


The following post might help you. Can you try to use ChrW(8220) and ChrW(8221)?


Protoyped the replacing with replacing to # for visual reasons

strPattern = String.Format("({0})", String.Join("|",{"""",ChrW(8220),ChrW(8221),"""}))
 @"“ - “
 ” - ”
 “ - ”
 "" - ""
 "" - ""
 Regex.Replace(strText, strPattern,"#")
 @"# - #
 # - #
 # - #
 # - #
 # - #"

No , i need to replace &#8220 with “ or ” or " , not the other way around

@kavya.s16 , Could you provide us with sample inputs that contain these kind of values that we need to replace?

We want to identify if it follows a particular pattern or is it always the same value.

Company Holdings Advisors (Beijing) Company Limited (“BJWFOE”)

Is being extracted as Company Holdings Advisors (Beijing) Company Limited ("BJWFOE")

so i am trying to replace it
HTML 4.0 Special Entities according to data in this link

“ - & #8220;
” - & #8221;
" - & quot;

i have to replace them respectively

As showcased above

  • define an array of characters/strings you want to replace
  • get from this the regex pattern
  • replace it with Regex.Replace

can u provide the xaml if possible please!!

could u tell how to replace it with quotes instead of #

& #8220; -------
& #8221; --------
& quot; -------"

@Palaniyappan @Gokul001

Hi @kavya.s16,

As @supermanPunch suggested, please provide both

  1. Your input sample strings
  2. Your required output after the replace

This way the forum members get a better idea what your inputs and expected output are. In such forums, asking questions clearly is important to get your problem resolved quickly.

above are the extracted data with garbage value/html entities
below is the actual data , so i need to use replace function @Palaniyappan @Gokul001 @jeevith @supermanPunch @ppr

@kavya.s16 , In that case, could you provide us with this Excel File, it would help us faster to work on the solution/suggest the steps required.

apologies , uploading file from client machine is restricted , i could just provide screenshot :frowning:

Lets Crosscheck If HTML entity Decoding will better serve for the case

1 Like


FYI, the following is ppr’s way.




1 Like

do i need to install any package to use this?


Nope, we can use this method in default settings.



for using


we will modify the XAML file in some cases, when the statement is not recognized by the compiler

  • Take a backup from your file in advance
  • open the xaml within a text editor (e.g. notepad++)
    add following line to it

    reopen it in Studio

find starter help here:
EncodeDecodeStrings.xaml (5.5 KB)

Hi @Yoichi , i need to replace with this string which is left double quotation mark

I used HttpUtility.HtmlDecode("“").Replace(“)
but it says string constants must end with double quotes @Palaniyappan @ppr

could u please help


Do you want to replace double quote with left double quote? If so, the following will work