Hacker News new | ask | show | jobs
by cyberdelica 1873 days ago
It goes to show, how few people are able to think for themselves.

The question originally asked, is "how to match HTML tags". Not how to parse. Not how to scrape. Simply "match". To which I would say, regex is perfectly suited to the task.

Furthermore - if one simply needs to scrape content, regex is again, perfectly suited. Scraping, is not parsing - and has no real need for a full blown DOM parsing library.

Cargo cult parrots like to say - if the HTML content changes, then one's regex will fail. Well, so will one's DOM parser.