3 ms·
The problem is: you cannot parse malformed (real, everyday) html with regexes. But if you need to parse html even malformed) generated by the same template (li
by motoboi 5y ago
The problem is: you cannot parse malformed (real, everyday) html with regexes.
But if you need to parse html even malformed) generated by the same template (like a scrapping situation), the whole file becomes regular, which can be parsed by a regular expression.
But if you try to parse html in general, too bad because then you’ll need to take html in consideration and will need a recursive descent parser, not a regex.
This question popped up so many times in forums in 2000’s that people got mad at that.