Get the App
SLTechnology News&Howtos  ›  Development  › 

How to remove HTML tags and delete HTML

Shulou Source: shulou.com Published: 2022-06-03 08:44:19 11月15日 Update

This article will explain in detail how to remove HTML tags and delete HTML, the editor thinks it is very practical, so share it for you to do a reference, I hope you can get something after reading this article.

The code is as follows:

/ / remove HTML tags / public static string DeleteHTML (string Htmlstring) {/ / Delete HTML Htmlstring = Regex.Replace (Htmlstring, @ "] *) >", ", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace (Htmlstring, @" ([\ r\ n]) [\ s] + ",", RegexOptions.IgnoreCase); Htmlstring = Regex.Replace (Htmlstring, @ "-->", ", RegexOptions.IgnoreCase) Htmlstring = Regex.Replace (Htmlstring, @ "

Tags: Tags articles more good practical code content articles knowledge references help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MySQL Shulou Tech Info OPPO Reno MariaDB