|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help needed with Search/ReplaceI have a string that has several occurrences of \" and I would like to
replace them with " msg = msg.Replace("\"", """); //this does not work Any suggestions? >I have a string that has several occurrences of \" and I would like to what about that:> replace them with " > > msg = msg.Replace("\"", """); //this does not work > > Any suggestions? msg = msg.Replace("\\\", "\"") Thanks, but it did not work and has some sysntax errors
Show quote "Lloyd Dupont" wrote: > >I have a string that has several occurrences of \" and I would like to > > replace them with " > > > > msg = msg.Replace("\"", """); //this does not work > > > > Any suggestions? > > what about that: > msg = msg.Replace("\\\", "\"") > > > what syntax error?
it does compile and work! proof of it, I'll send you the an attach sample! Show quote "Mori" <M***@discussions.microsoft.com> wrote in message [attached file: Program.cs]news:29CF6B4C-7AD4-4922-90A4-6D9F4C728D60@microsoft.com... > Thanks, but it did not work and has some sysntax errors > "Lloyd Dupont" wrote: > >> >I have a string that has several occurrences of \" and I would like to >> > replace them with " >> > >> > msg = msg.Replace("\"", """); //this does not work >> > >> > Any suggestions? >> >> what about that: >> msg = msg.Replace("\\\", "\"") >> >> >> > Thanks, but it did not work and has some sysntax errors Oops... right, there is a syntax error:>> msg = msg.Replace("\\\", "\"") => msg = msg.Replace("\\\"", "\"") however I'm concerned.... can't you solve that? I would be worry if I were your boss :-/ |
|||||||||||||||||||||||