Solved

ASP replace function - problem with quotation marks

Posted on 2006-07-03
2
360 Views
Last Modified: 2007-12-19
Hi

I am trying to replace the latter end of URLs in a long string of data to open the links in a new window. All of the URLs end with the letters 'CQ' What I need to do is replace the string

      CQ">

with the string

      CQ" target = "_blank">

The replace function is obviously going to get confused by the double quotes - is there a way I can identify and replace this string without baffling the function?
0
Comment
Question by:Nicola-H
2 Comments
 
LVL 12

Accepted Solution

by:
Proactivation earned 100 total points
ID: 17029878
Hi Nicola,

Just replace any double quotes with double-double quotes, so:

Replace(myString, "CQ"">", "CQ"" target = ""_blank"">")
0
 
LVL 1

Author Comment

by:Nicola-H
ID: 17029891
Fabulous - thanks :-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…

685 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