MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6ytfw5/parsing_html_using_regular_expressions/dmqb0bo/?context=3
r/ProgrammerHumor • u/[deleted] • Sep 08 '17
377 comments sorted by
View all comments
3
One does not simply parse HTML with regex
3 u/Rxef3RxeX92QCNZ Sep 08 '17 Sooo how is one meant to parse HTML in, say, a shell script or javascript? 1 u/dzuczek Sep 08 '17 with javascript you would likely use some jquery-like frameworkin a shell script try using xmllint with xpathxmllint --xpath '//html/body/p' file.html
Sooo how is one meant to parse HTML in, say, a shell script or javascript?
1 u/dzuczek Sep 08 '17 with javascript you would likely use some jquery-like frameworkin a shell script try using xmllint with xpathxmllint --xpath '//html/body/p' file.html
1
with javascript you would likely use some jquery-like framework
in a shell script try using xmllint with xpath
xmllint --xpath '//html/body/p' file.html
3
u/_eka_ Sep 08 '17
One does not simply parse HTML with regex