HOW TO strip HTML tags and show just web page text

Using C# & Regular Expressions, it can be done like this -

string stripped = System.Text.RegularExpressions.Regex.Replace(text,@"<(.|\n)*?>",string.Empty);

The lean, mean & Swiss knife of an editor, Editplus has a short cut for it - Ctrl + Shift + P or from the menu:
Edit > HTML > Strip HTML tags

Also see: HOW TO convert HTML content to plain text with Excel

Comments

  1. EditPlus rocks!
    Used it for 8 years and counting....
    Nice RegEx - thanks

    ReplyDelete

Post a Comment