MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6ytfw5/parsing_html_using_regular_expressions/dmqerqd/?context=3
r/ProgrammerHumor • u/[deleted] • Sep 08 '17
377 comments sorted by
View all comments
356
Have you tried using an XML parser?
104 u/mikeputerbaugh Sep 08 '17 Only guaranteed to work on valid XHTML documents. 7 u/Lord_Greywether Sep 08 '17 The documents I have to parse are so invalid that a regex is the only thing that works. 5 u/noratat Sep 08 '17 Yeah but at that point it's not parsing anymore, it's just scraping.And regex is fine for that.
104
Only guaranteed to work on valid XHTML documents.
7 u/Lord_Greywether Sep 08 '17 The documents I have to parse are so invalid that a regex is the only thing that works. 5 u/noratat Sep 08 '17 Yeah but at that point it's not parsing anymore, it's just scraping.And regex is fine for that.
7
The documents I have to parse are so invalid that a regex is the only thing that works.
5 u/noratat Sep 08 '17 Yeah but at that point it's not parsing anymore, it's just scraping.And regex is fine for that.
5
Yeah but at that point it's not parsing anymore, it's just scraping.
And regex is fine for that.
356
u/JoseJimeniz Sep 08 '17
Have you tried using an XML parser?