Replace Function

Results 1 to 3 of 3

Thread: Replace Function

  1. #1
    Rob Guest

    Default Replace Function

    I want to replace all double quote marks (") with a single quote mark (&#039) Can anyone help me with this?<BR><BR>This is what I have now:<BR><BR>strReturn = Replace(strReturn,""","&#039")<BR><BR>Thanks.

  2. #2
    Leungas Guest

    Default RE: Replace Function

    there is a function in VB - CHR (i think) which feed in the ASCII code to return some character. " is 34 I think, so try it out

  3. #3
    Join Date
    Dec 1969

    Default RE: Replace Function

    You can represent the double quote in VBScript by either using two successive double quotes: "", or by using a specific chr value.<BR><BR>I usually use the two double quotes. So, you could write your replace function as:<BR><BR>Replace(str,"""","&#039")<BR><BR>Now, I know that might be hard to read, so, if we represented double quotes with the letter a, and single quotes with the letter b, it would look like:<BR><BR>Replace(str,aaaa,aba)<BR><BR>Hope this helps!

Posting Permissions

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