in reply to printing html entities

Or, so it the reverse of what merlyn suggested: instead of knowing all the html tags, know all the C++ things likely to be included. For example, the regexp
s/<([^> ]*\.h)>/&lt;$1&gt;/g;
should take care of your example...