Hacker News new | ask | show | jobs
by raldi 3920 days ago

    <img[^>]+>|(\w+)
...has some bugs. The part on the left mistakenly matches `<imgasvaasdf>` and mistakenly misses `<img>`. Better would be:

    <img\b.*?>|(\w+)