Hard
Matching Tags
Find every
<tag>…</tag> pair where the closing tag has the same name, using a backreference like <(\w+)>.*?</\1>. Print each tag name and its inner text as tag: text (or none).Input
One line.
Output
Lines.
Sample 1
Input
<b>bold</b> and <i>italic</i>
Output
b: bold i: italic
Sample 2
Input
<b>bad</i>
Output
none
Output appears here