I have a column which contains HTML templates. These can contain "internal" comments which are entered as:
{/*}My Comment{*/}
these are stripped out by the front end before the rendered HTML is sent to the user's browser.
However, I have hit a snag where I want to strip these out in a situation where the front end doesn't get the chance to remove them. For now my quickest way will be in SQL (in the Sproc that retrieves the templates)
So given a
DECLARE @MyString varchar(8000) SET @MyString = 'xxx{/*}My Comment{*/}yyy'
what's the best way to remove the comment?
This is for SQL2000, iterative loops are OK, the comments may be nested.