r/ProgrammerHumor • u/NorseGodLoki0411 • Aug 31 '17
Can you parse HTML with regular expressions?
http://i.magaimg.net/img/1alx.png
504
Upvotes
r/ProgrammerHumor • u/NorseGodLoki0411 • Aug 31 '17
5
u/leshift Aug 31 '17
Link??
23
u/Imaurel Aug 31 '17
"HTML tags leaking from your eyes like liquid pain" is a beautiful phrase. It's mine now.
8
u/aliciamagee Aug 31 '17
Wow /r/surrealmemes joins /r/ProgrammerHumor. Excellent.
5
u/supremecrafters Sep 01 '17
DEAR GOD!
Requesting reclassification of "parsing HTML with regular expressions" from Keter to Apollyon.
31
u/[deleted] Aug 31 '17
I think this answer being locked by moderators secures StackOverflow's place as a forum for pedants and assholes. I've now switched to reading blogs (with code examples) and documentation.
3
u/Def_Not_KGB Aug 31 '17
I'll always upvote tony the pony
3
u/RagingNerdaholic Aug 31 '17
That is a damn impressive level of dedication.
3
u/penguinade Sep 01 '17
So just expressions?
3
u/[deleted] Sep 01 '17
We had an assignment in first semester computer science where we were required to parse HTML with regex. Was a quality assignment, I swear...
4
u/marcosdumay Aug 31 '17
Bonus points because that answer is for a question about deciding if a tag was an opening or closing tag, what definitively can be done with regular expressions.
3
u/RedDwarfian Aug 31 '17
Have you tried a xml parser instead?
1
u/Abaddon314159 Sep 01 '17
No. But the real question is can HTML parse regex?
1
u/[deleted] Sep 02 '17
fun fact: I recently spent quite a while using regex and requests to create a kind of rss feed for a page that requires a login and had no feed. in the end i gave up
1
u/celmaigri Sep 02 '17
Lol
0
u/[deleted] Aug 31 '17
[deleted] — view deleted comment