0

I have a string

string str = "\"PDORB9-AG, 16 1/2\"\" BIAS UNIT ASSY, ORBIT 900\"";

I need the output in this format

"PDORB9-AG, 16 1/2"" BIAS UNIT ASSY, ORBIT 900"

I tried this regex

Regex re = new Regex("[\"]");
str = str.Replace(re, " ").Trim();

But the str returns in output as "PDORB9-AG, 16 1/2 BIAS UNIT ASSY, ORBIT 900" the quotes are missing next to 1/2. How to solve this?? Any leads appreciated

user2990856
  • 51
  • 1
  • 4

1 Answers1

0

Your string already has the format you want.

string str = "\"PDORB9-AG, 16 1/2\"\" BIAS UNIT ASSY, ORBIT 900\"";

Means that str holds the value "PDORB9-AG, 16 1/2"" BIAS UNIT ASSY, ORBIT 900"

phuzi
  • 12,078
  • 3
  • 26
  • 50