logoalt Hacker News

marcosdumayyesterday at 9:23 PM1 replyview on HN

HTML comments do not nest. The obvious tokenizer you can create with regular expressions is the correct one.


Replies

kstrauseryesterday at 9:42 PM

If you're talking about tokenizers, then you're no longer parsing HTML with a regex. You're tokenizing it with a regex and processing it with an actual parser.

show 1 reply