|
-
Jun 13th, 2008, 01:15 AM
#1
Re: Need help with replace issue
 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.
-
Jun 13th, 2008, 02:18 AM
#2
Thread Starter
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|