4 ms·
Yes that's basically what I wrote about here: https://news.ycombinator.com/item?id=26359556 https://news.ycombinator.com/item?id=26359556 I listed 3 or 4 cave
by chubot 6y ago
Yes that's basically what I wrote about here:
https://news.ycombinator.com/item?id=26359556 https://news.ycombinator.com/item?id=26359556
I listed 3 or 4 caveats. CDATA might be another one since I'm not handling those... I've never used it so I left it out.
Actually I remember that regular languages weren't entirely enough; I think the .*? non-greedy matching was useful, e.g. for finding --> at the end of comments.