Tag:Remove HTML

  • Regularization of removing HTML tags and spaces by ASP


    function nohtml(str)  dim re  Set re=new RegExp         re.IgnoreCase =true         re.Global=True         re.Pattern=”(\<.[^\<]*\>)”         str=re.replace(str,” “)         re.Pattern=”(\<\/[^\<]*\>)”         str=re.replace(str,” “)         str=replace(str,”&nbsp;”,””)        str=replace(str,” “,””)        nohtml=str         set re=nothing  end function

  • How does Sql Server remove Html tags from content


    Share a way to remove Html tags from content and test data: DECLARE @str NVARCHAR(max)=’ <!DOCTYPE html> <html> <head> </head> <body> < div > haha </div > </body> </html> ‘ The methods are as follows: CREATE FUNCTION [dbo].[removehtml] (@str NVARCHAR(MAX)) RETURNS NVARCHAR(MAX) AS BEGIN WHILE CHARINDEX(‘<‘, @str) > 0 BEGIN SET @str = STUFF(@str, CHARINDEX(‘<‘, […]