|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I remove an embedded Double quotesHello:
I am reading from a CSV file into a variable. The variable reads as ""My data"" since the file contains "My data" How do I get rid of the embedded double quotes? I tried myString.Replace(chr(34), "") It did not work even though Chr(34) occurs at 0 and 8. Help would be appreciated. venki vvenk
> myString.Replace(chr(34), "") String.Replace is a function that returns a new value with any replacements.Have you tried: myString = myString.Replace(chr(34), "") -- Show quoteHide quoteHope this helps Jay B. Harlow ..NET Application Architect, Enthusiast, & Evangelist T.S. Bradley - http://www.tsbradley.net "vvenk" <vv***@discussions.microsoft.com> wrote in message news:ED7241EF-6FE5-483D-901F-F0C9D0717C56@microsoft.com... > Hello: > > I am reading from a CSV file into a variable. > > The variable reads as ""My data"" since the file contains "My data" > > How do I get rid of the embedded double quotes? > > I tried > myString.Replace(chr(34), "") > > It did not work even though Chr(34) occurs at 0 and 8. > > Help would be appreciated. > > venki > > Jay:
How dumb could I be for overlooking such a simple mistake? You are a Godsend! Thanks you. venki Show quoteHide quote "Jay B. Harlow" wrote: > vvenk > > myString.Replace(chr(34), "") > String.Replace is a function that returns a new value with any replacements. > > Have you tried: > > myString = myString.Replace(chr(34), "") > > -- > Hope this helps > Jay B. Harlow > ..NET Application Architect, Enthusiast, & Evangelist > T.S. Bradley - http://www.tsbradley.net > > > "vvenk" <vv***@discussions.microsoft.com> wrote in message > news:ED7241EF-6FE5-483D-901F-F0C9D0717C56@microsoft.com... > > Hello: > > > > I am reading from a CSV file into a variable. > > > > The variable reads as ""My data"" since the file contains "My data" > > > > How do I get rid of the embedded double quotes? > > > > I tried > > myString.Replace(chr(34), "") > > > > It did not work even though Chr(34) occurs at 0 and 8. > > > > Help would be appreciated. > > > > venki > > > > > >
VB 6 developers and .Net
Read legacy vb5 files with variant declare in vb.net Running an Access macro from a VB.NETprogram How to assign value to a dropdown box items? How to prevent Pasting into textbox? ADOX add bool field efficient routine to parse a text string How do I replace unwanted characters from a string using Reg Exp? Memory problem with vb.net + webServices + DLL clicking on a DataGridView's DataSource property throws exception in designer |
|||||||||||||||||||||||