Results 1 to 29 of 29

Thread: [RESOLVED] Need help with replace issue

Hybrid View

  1. #1
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: Need help with replace issue

    Quote Originally Posted by Nitesh
    this is getting hectic. Say I have these within a string:

    Code:
    this is a test
    www.vbforums.com
    http://www.vbforums.com
    using my regexp function I extract www.vbforums.comand http://www.vbforums.com
    I now add these two strings to an array seperated by commas.

    Then I loop through the array and replace the first item with its array index so:

    www.vbforums.com becomes <--0--> and
    http://www.vbforums.com becomes <--1-->

    Now how will I go about replacing that.

    Please help
    If you can Replace() A's with B's then you can Replace() B's with A's. Convert instances of domain to token:

    strHTML = Replace(strHTML, strEmailIn(C), "<!--" & C & "-->")

    Then as already explained convert tokens to links. Don't convert directly from domains into links.

  2. #2

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: Need help with replace issue

    sorry for my ignorance,

    but using this text

    www.google.com

    www.google.com.au

    and www.google.com.ph

    and this code:

    Code:
     For B = 0 To UBound(strEmailIn())
           
            tempstr = stremailin(b)
    
            strHTML = Replace(strHTML, tempStr, "<-- " & B & " -->")
    
    
         Next B
    www.google.com becomes <--0-->

    www.google.com.au becomes <--0-->.au

    etc. is this right

Posting Permissions

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



Click Here to Expand Forum to Full Width