4 ms·
The "THERE IS NO SUCH THING AZ EQ....." part reminds me of the famous "you can't parse html with regex" answer on StackOverflow: https://stackoverflow.com/quest
by edem 9y ago
The "THERE IS NO SUCH THING AZ EQ....." part reminds me of the famous "you can't parse html with regex" answer on StackOverflow: https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags https://stackoverflow.com/questions/1732348/regex-match-open...
- marcosdumay 9y agoWait, it that answer famous for completely ignoring the question and discussing about some completely unrelated problem in a caricature of the SO community, or is it the one famous by the "you can't parse HTML with regexes" line? Because if it is the one famous by that line, too bad. I always expected that to became famous as an answer about how to parse HTML, not one about how to decide the kind of a tag.
- edem 9y agoThe answer is relevant, it answers the question and it is also famous. I don't know what are you talking about.
- chillacy 9y agoIt's famous, funny, and a classic, but the original SO question was about "matching open html tags" with a regex while the answer was about "parsing [X]HTML" with a regex. So the poster made some assumptions about what the original question's author was intending to do. Ultimately the choice between which tool to pick is a tradeoff that has to be made by the author, as hinted in the (much better) second answer: https://stackoverflow.com/a/1733489 https://stackoverflow.com/a/1733489
- marcosdumay 9y agoJust to add to chillacy's answer, regular expression are a perfectly valid and reasonable tool to do what I understand the question author wanted to do. His proposal was buggy (he misses a single situation), and I would use something more than pure regexes myself, but it's perfectly reasonable to use them to detect opening HTML tags.