Match Html5, non XML, start tags or self closing tags
Only for fun
<[^=\'"\\\/> ]+( ( *([^=\'"\\\/> ]+ *= *(("([^"]?(<!--(\s|\S)*-->)*[^"]+)*")|(\'([^\']?(<!--(\s|\S)*-->)*[^\']+)*\')|(([^\'" \>]?(?!\/>)[^=\'" \/\>]+)+))|([^=\'" \>]?(?!\/>)[^=\'" \/\>]+)+|(<!--(\s|\S)*-->)))*)? *>
Test cases
Asserts
<p >some text
<h1 <!--what'
sup -->
class = "
e"
>
<link rel=icon type='image\>
/x-icon' >
Hi <br>
<wĔbC0mponent ✔️ titlĔ="web\nComp"data-attr=123 disabled✔️>
Why Fails.C fails?