Medium
Remove HTML Tags
Read a line of HTML and print just the text, with every tag like
<b> or </p> removed (<[^>]+>) and runs of spaces collapsed to one.Input
One line.
Output
One line.
Sample 1
Input
<p>Hello <b>World</b></p>
Output
Hello World
Sample 2
Input
no tags here
Output
no tags here
Output appears here