how to remove double quote from string

Posted on 2008-11-07
Last Modified: 2012-05-05
Hopefully a simple solution.  I am trying to pass text to a variable...


This is a "lovely day" for all of us experts.

I want to assign the text above to a variable (strData) and I want to strip out the double quotes.  I am getting that text from my CMS application.
I have been using this without any luck

function cleanString(myString)

    myString = replace(myString,"'","")

    myString = replace(myString,"","")   

    myString = replace(mystring,"", "")

    myString = replace(mystring,"", "")

   ' myString = Replace(mystring, """, "")

    mySring  = Replace(mystring, "'", "")

    myString = replace(mystring, """","")

    'myString = replace(mystring,"chr(34)","")

    'myString = replace(mystring, chr(34),"")

    cleanString = myString

end function

Open in new window

Question by:jweissdandm
    LVL 16

    Expert Comment

    Hmm.. This should have resolved the problem:

    myString = replace(mystring, """","")

    I wonder if it's an issue with it going thru the function properly. What happens when you run the replace directly on the string itself, then print it out to see?

    mystring = 'This word is "quoted" yo.'
    mystring = replace(mystring, """","")
    response.write mystring

    If it still fails, do a replace for another character just to ensure it is working properly (say, the character 'o').
    LVL 16

    Accepted Solution

    If the above suggestion does not work, may be it is not a double quote?

    Can you try and replace a ascii character 168 (ALT-0168 : ¨), that looks like a double quoute.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now