I am scraping a pdf using ABBYY OCR and I convert the output into a string. In certain places the string contains double double quotations (i.e. “”). For example the string contains: (““Us””, ““We””, ““You””). There are also other random occurrences of this issue.
I want to replace all occurrences of the double double quotes (“”) with a single double quote (").
So I use String.Replace("""","a") and this targets all double double quotes and replaces them with an ‘a’ character. But how can I replace them all with a double quotation character?
I am somewhat shocked that there is no escape character, e.g. the use of the back slash in c#, javascript etc.
Yeah I know this. Your solution solved the problem for me, many thanks. My original string replace also solves this issue.
My issue turned out to be the output of the debugger that was not as expected. It prints the double double quotes even though the new string does not contain them. I think if does this for reopening the string after the first double quote closes it.