input: Write a function to convert an HTML string to plain text without using any libraries. The function should remove all HTML tags and return the cleaned text.
  
  assert html_to_text("<p>Hello <b>World</b>!</p>") == "Hello World!"
  assert html_to_text("<h1>Header 1</h1><p>Paragraph</p>") == "Header 1Paragraph"
  assert html_to_text("<div><span>Nested</span> tags</div>") == "Nested tags"
  assert html_to_text("<a href='http://example.com'>Link</a>") == "Link"
  assert html_to_text("") == ""
output: def html_to_text(html):
      import re
      return re.sub(r'<[^>]+>', '', html)