PDA

View Full Version : Search & Replace "


Leeus
01-02-2003, 12:54 PM
I have this string I want to search for "/map/ note the quote, I have tried using ' but to no avail, and I have tried "

whammy
01-02-2003, 11:26 PM
What exactly are you trying to do? Just replace the quote? Or find an instance of "/map in the string?

aCcodeMonkey
01-03-2003, 03:07 AM
Leeus,

You can use InStrRev() to do your search.

Format:
InStrRev(string1, string2[, start[, compare]])

Dim sSourceString
Dim bFound
Dim sReplString

sSourceText = Request.Form("txtComments")
sRegExp = chr(34) & "/map/"
e.g.

bFound = InStrRev(sSourceText , sRegExp)

If (IntStrRev(sSearchString, sRegExp,0,1) <> -1) then

{ Add your code here }

End IF

Hope this Helps :cool:

Leeus
01-03-2003, 07:22 AM
Yes Whammy I am trying to search for that, I think this method should work though, I 'm just trying to rip off multi-map with the MsHTML.XML Object, its working so far!