Thanks for the help Steven!
I kept on searching and after 3 hours I finally got what I wanted!!!!
It was on this site:
http://coveryourasp.com/ShowFileDescr.asp
And the code for anyone else interested is below...
function htmlContentReplace(strHTML,strSearch,strReplace)
htmlContentReplace = RegExpReplace(strHTML, "(?![^<]+>)" + strSearch +
"(?![^<]+>)", strReplace)
'htmlContentReplace = RegExpReplace(strHTML, "(?![^<\[]+[>\]])" + strSearch
+ "(?![^\[<]+[>\]])", strReplace)
end function
Function RegExpReplace(strInput, strPattern, strReplace)
' Use <?> to indicate the match you wish to replace
' Create and setup several variables:
Dim regEx, Match, Matches, Position, strReturn
Position = 1
strReturn = ""
' Set up the regular expression:
Set regEx = New RegExp
regEx.Pattern = strPattern
regEx.IgnoreCase = True
regEx.Global = True
' Get all the matches for it:
Set Matches = regEx.Execute(strInput)
' Go through the Matches collection
' and build the output string:
For Each Match in Matches
strReturn=strReturn & Mid(strInput, Position,
Match.FirstIndex+1-Position)
strReturn=strReturn & Replace(strReplace, "<?>", Match.Value)
Position = Len(Match.Value) + Match.FirstIndex + 1
Next
' Add any text after the last match
strReturn = strReturn & Mid(strInput, Position, Len(strInput))
RegExpReplace = strReturn
End Function
"Steven Burn" <so*******@in-time.invalid> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I should mention, my "solution" is going to look extremely pitiful compared
to Roland's (usually does <g>) so you may want to wait for his ;o)
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!