Remove HTML Tags
Plain text with HTML tags removed
Clean DataHow it works
1. regex-replace Replace text matching a regex pattern 2. squeeze Collapse extra whitespace and blank lines
$ regex-replace --pattern=<[^>]+> --replacement= | squeeze Examples
Strip HTML tags from a CMS export for plain text
Usage
"<h1>Welcome</h1><p>This is a <b>bold</b> and <i>italic</i> p..." | regex-replace --pattern=<[^>]+> --replacement= | squeeze Extract text from scraped product HTML
Usage
"<div class="product"><span class="name">Widget Pro</span> - ..." | regex-replace --pattern=<[^>]+> --replacement= | squeeze Remove list markup from an HTML snippet for a text summary
Usage
"<ul><li>Item one</li><li>Item two</li><li>Item three</li></u..." | regex-replace --pattern=<[^>]+> --replacement= | squeeze