Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
The best (ie non hacky) way to remove HTML tags is to load the text into a HTML parser and have it spit out the plain text version. There are plenty of HTML parsers out there, depending on your pro...
Answer
#1: Initial revision
The best (ie non hacky) way to remove HTML tags is to load the text into a HTML parser and have it spit out the plain text version. There are plenty of HTML parsers out there, depending on your programming language, however, not SQL. So in C# you'd read each entry in an external program, run it through the parser and write it back. I'd suggest [HtmlSanitiser ](https://github.com/mganss/HtmlSanitizer)to do this. Use it: > var sanitizer = new HtmlSanitizer(); > PlainText = sanitizer.Sanitize(HtmlText); the benefit of this is that you can remove specific tags from theHTML, leaving others. Eg you can leave i and b tags and remove everything else.