#K33947. HTML Text Extractor
HTML Text Extractor
HTML Text Extractor
Given a string representing HTML content, extract and concatenate all the text found within the HTML tags. Only text which is enclosed by a pair of tags should be extracted. If there is no text inside the tags, the output should be an empty string.
The extraction uses the regular expression pattern in \( \texttt{>([^<]+)) and an opening angle bracket (<). The resulting texts must be concatenated with a single space separating each extracted portion.
inputFormat
The input is provided via standard input (stdin) as a single string containing valid HTML.
outputFormat
Output, to standard output (stdout), the concatenated text contents extracted from inside the HTML tags. Each piece of extracted text should be separated by a single space. If no valid text is found within tags, print an empty string.
## sampleHello, World!
Hello, World!