Replacing quotation marks

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Replacing quotation marks

    The following removes any unwanted apostrophes before being inserted
    into an sql database:

    Articletext = replace(articleText,"'","''")

    ..but if I need to remove all quotation marks, this doesnt work:

    Articletext = replace(articleText,""","''")


    ????
    Muench

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    J. Muenchbourg Guest

  2. Similar Questions and Discussions

    1. Garamond Premier Pro: quotation marks?
      A question about Garamond Premier Pro, the font package that now ships with anything bearing the Adobe brandname. I'm trying to use it, for the...
    2. anybody getting quotation marks
      so every time i attempt to install flash 8, it prompts me if i want to run activeX controls, i click yes, i see the green/red/blue square for a...
    3. CFSET and Quotation Marks
      I have a page that generates an html attachment and sends it in email to an admin. The page is an asp page. my problem is that the asp page code...
    4. Tyogrpaher's Quotation Marks?
      Is there a way to get typographer's or "smart" quotes to display in Fireworks? I've yet to find how to do this. I'm running OSX and FireWorks MX....
    5. Quotation marks
      How can I make correct quotation marks insted of inches?
  3. #2

    Default Replacing quotation marks

    "" = empty string
    """ = empty string + extra "

    To place a " into a string use "".

    Your code would then be:
    Articletext = replace(articleText,"""","''")
    or alternately:
    Articletext = replace(articleText,CHR(34),"''")

    HTH,
    John




    >-----Original Message-----
    >The following removes any unwanted apostrophes before
    being inserted
    >into an sql database:
    >
    >Articletext = replace(articleText,"'","''")
    >
    >..but if I need to remove all quotation marks, this
    doesnt work:
    >
    >Articletext = replace(articleText,""","''")
    >
    >
    >????
    >Muench
    >
    >*** Sent via Developersdex [url]http://www.developersdex.com[/url]
    ***
    >Don't just participate in USENET...get rewarded for it!
    >.
    >
    John Beschler Guest

  4. #3

    Default Re: Replacing quotation marks

    You need to double-up apostrophes to stop them interfering with the
    delimiters needed around textual column contents - why do you need to
    double-up quotes?

    Alan

    "J. Muenchbourg" <jodaddy@canada.com> wrote in message
    news:#w4TLrnZDHA.2520@TK2MSFTNGP09.phx.gbl...
    > The following removes any unwanted apostrophes before being inserted
    > into an sql database:
    >
    > Articletext = replace(articleText,"'","''")
    >
    > .but if I need to remove all quotation marks, this doesnt work:
    >
    > Articletext = replace(articleText,""","''")
    >
    >
    > ????
    > Muench
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Alan Guest

  5. #4

    Default Replacing quotation marks

    I have been given this string that contains a quotation mark

    myString = "the length is 24" long"

    how can i replace the " after 24 with the word inches.

    i used this to remove any commas from a string

    repeat while (thestring contains ",")
    thePos = offset(",",theString)
    put " "into theString.char[thePos]
    end repeat

    it doesnt work for a quotation

    thanks




    action bolt webforumsuser@macromedia.com Guest

  6. #5

    Default Re: Replacing quotation marks

    -- Welcome to Director --
    s="abc"&quote&"def"
    put s
    -- "abc"def"
    put offset(quote, s)
    -- 4
    put "inches" into char 4 of s
    put s
    -- "abcinchesdef"

    Andrew
    Andrew Morton Guest

  7. #6

    Default Re:Replacing quotation marks

    <<I have been given this string that contains a quotation mark

    myString = "the length is 24" long"

    how can i replace the " after 24 with the word inches.

    i used this to remove any commas from a string

    repeat while (thestring contains ",")
    thePos = offset(",",theString)
    put " "into theString.char[thePos]
    end repeat

    it doesnt work for a quotation

    thanks>>

    It should work if you sub the key word QUOTE (no quotes around it)

    repeat while (thestring contains QUOTE)

    Gretchen Macdowall
    updateStage, inc.
    Gretchen webforumsuser@macromedia.com Guest

  8. #7

    Default Re: Replacing quotation marks

    --

    P.S. "The length is 24" long" is poor English. It should be "the length is 24""
    or "it is 24" long".

    Andrew

    Andrew Morton Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139