I iterate through whole html file, character by character and I want to get html tags.
If I come across '<' it means for me that is start of wanted tag and respectively I consider '>' as its end. Of course, JavaScript scripts can have '<' as well as '>' inside, so my program will treat them as wanted tag when they occur. I want to prevent such a mistakes.
Is there any regex, which I could use or any idea to do this? I tried checking scripts using JavaScript programming language keywords but this method doesn't convince me.