Speed up string replace with Classic ASP

Posted on 2009-04-17
Last Modified: 2012-05-06
I need to know if there is a way to replace a string in another string without using the string.replace available in classic ASP.
I have the following. I have an HTML template page for a mailer. The template has [[VARIABLE]] markers that need te be replaced for each user. With 10 000 users + the normail replace(HTMLBODY,"[[VARIABLE]]",varName) just takes forever.
Question by:OlineI
    1 Comment
    LVL 6

    Accepted Solution

    No there isn't a better replace function.

    What you could do is:
    - split the template into smaller parts (e.g HTMLBODY1, HTMLBODY2...)
    - run a replace only on the piece that contains the variable.
    - put the pieces back together.

    I you do so, the replace function will have less text to search through.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 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

    18 Experts available now in Live!

    Get 1:1 Help Now