...

View Full Version : strip html



esthera
03-12-2006, 06:54 PM
Is there anyway I can strip all html between the < > tags with one function? Maybe replacing just <br> or <li> with vbcrlf

I don't want html that i have displayed to go into my database.

BaldEagle
03-12-2006, 10:06 PM
Function RXreplace(rxPattern, myStr, repStr)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = rxPattern
regEx.IgnoreCase = True 'optional
RXreplace = regEx.Replace(myStr, repStr)
End Function


This function should be able to be used universally. However, as for the regex itself I am not well versed in that, so figuring out which pattern needs to be passed in will be up to you.

BaldEagle

esthera
03-13-2006, 06:52 AM
hmm.. i don't know regexp either -- anyone out there that can help me edit this to just strip whatever is between html tags?

degsy
03-13-2006, 02:55 PM
http://www.4guysfromrolla.com/webtech/042501-1.shtml



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum