ChipW
|
| Posted: 01/04/2005, 2:55 PM |
|
I'm needing to create a data feed, but need to get rid of the HTML tags and the carriage returns (not <br>) that are in a column in my DB.
Thanks
Chip
|
|
|
 |
guest
|
| Posted: 01/05/2005, 9:22 PM |
|
Maybe this will help
Function stripHTML(strHTML)
'First grt rid of the <BR> and use vbcrlf instead
Replace(strHTML, "<br>", "VBCRLF")
'Then use rgular expression to remove the rest
'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp
s
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<(.|\n)+?>"
'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strHTML, "")
'Replace all < and > with "";
strOutput = Replace(strOutput, "<", "")
strOutput = Replace(strOutput, ">", "")
stripHTML = strOutput 'Return the value of strOutput
Set objRegExp = Nothing
End Function
Regards
Wayne
"ChipW" <ChipW@forum.codecharge> wrote in message
news:641db1ecadec7f@news.codecharge.com...
> I'm needing to create a data feed, but need to get rid of the HTML tags
> and the
> carriage returns (not <br>) that are in a column in my DB.
>
> Thanks
> Chip
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|