Converted part of scan_html_tag to C# from Regex

This does not have any measurable impact to parsing spec.txt but it
should have performance benefit when parsing documents with lots of HTML
elements.