News for hackers. Stuff that matters.
Re:Htmlq: like jq, but for html by gostsamo on Tuesday September 07, 2021 @04:03AM (#28442216)
You can't parse html with regular expressions :)

https://stackoverflow.com/questions/1732348/regex-match-open...

Re:Htmlq: like jq, but for html by bmn__ on Tuesday September 07, 2021 @04:30AM (#28442401)
"Oh Yes You Can Use Regexes to Parse HTML!"

https://stackoverflow.com/a/4234491

Re:Htmlq: like jq, but for html by anon4242 on Tuesday September 07, 2021 @06:21AM (#28443034)
Yeah, if you allow yourself some Perl to help you with those parts that regexes can't handle...
Re:Htmlq: like jq, but for html by akie on Tuesday September 07, 2021 @06:22AM (#28443037)
Technically correct, but did you see the regex he uses? It spans 82 lines...
Re:Htmlq: like jq, but for html by andybak on Tuesday September 07, 2021 @04:19AM (#28442320)
And the obligitory caveat from the comments:

> While arbitrary HTML with only a regex is impossible, it's sometimes appropriate to use them for parsing a limited, known set of HTML.

Re:Htmlq: like jq, but for html by hnbad on Tuesday September 07, 2021 @04:22AM (#28442348)
The emphasis here is on "known". The tool is general purpose (i.e. handling unknown HTML) so using regexes would be ill-advised.