loop questiosn.

Results 1 to 2 of 2

Thread: loop questiosn.

  1. #1
    Join Date
    Dec 1969

    Default loop questiosn.

    I have a patten matching script. this looks for the &#060;img tag and adds a border=0 to it. the problem is when i come to loop though. i can&#039;t manage to get past the first instance. any ideas?<BR><BR>intStartPlace = InStr(strSearchText, "&#060;img") <BR>&#039; The next line may need a "+1" on the end - you&#039;ll need to check. <BR>intEndPlace = InStr(intStartPlace, strSearchText, "&#062;")+1 <BR>strSelectedText = Mid(strSearchText, intStartPlace, intEndPlace-intStartPlace) <BR><BR>&#039;Second step is to replace it with what you want to replace with: <BR><BR>Dim strReplaceWith <BR>&#039; Copy the string <BR>strReplaceWith = strSelectedText <BR>&#039; Take off the "&#062;" <BR>strReplaceWith = Left(strSelectedText, Len(strSelectedText)-1) <BR>&#039; Add on your text <BR>strReplaceWith = strReplaceWith & " border=0 " <BR>&#039; Put back on "&#062;" <BR>strReplaceWith = strReplaceWith & "&#062;" <BR>strSearchText = Replace(strSearchText, strSelectedText, strReplaceWith)

  2. #2
    Join Date
    Dec 1969

    Default What is happening?

    I didn&#039;t review the code in any detail, but overall it looks kosher.<BR><BR>-Doug

Posting Permissions

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