For anyone interested, I created a SQL stored procedure a while back to do
just this...
Create Function dbo.stripHTML(@ourText varchar(8000))
Returns varchar(8000)
As
Begin
Declare @newText varchar(8000);
Set @newText = @ourText;
Declare @Counter int;
Declare @Counter2 int;
Set @Counter = CharIndex('<', @newText, 0);
While @Counter != 0
Begin
Set @Counter2 = CharIndex('>', @newText, @Counter);
If @Counter2 != 0
Set @newTest = (Select Stuff(@newText, @Counter,
(@Counter2 - @Counter + 1), ''));
Set @Counter = CharIndex('<', @newText, @Counter);
End
Return @newText;
End
Not the most efficient way of coding it, but nice and easy to read :0)
Scott.
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]