Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@2nd2NULL Regex can be extremely powerful if you use it right, but not as powerful as Chuck Norris though :)
-
watzon45877y@TerriToniAX you should never use regex to parse HTML as HTML can not be reliably parsed in that way. https://stackoverflow.com/questions...
-
arekxv10527yBest approaches are either XPath or a Selector query library like jQuery. There probably is a version for your language which works like jQuery but its takes any html string as an input. :)
-
@TerriToniAX Chuck Norris is a racist extremist bag of dicks who is against teaching science in schools, against doctors, pro tobacco industry, against lgbt rights, and completely unworthy of being a positive meme.
-
@bittersweet I don't know him, but in case what you say about him is true, then he could be like Trump's bastard brother or something.
-
cod3r767yFuck Chuck Norris, I've done this, took me two days to figure shit out but the end result was beautiful.
-
skprog19107yUsing regex to parse html would take forever. Unless you focused on tag open and close brackets. /<*/>*///<*/> but even than you'd have over lapping html pulling in 10 times what you need. Ya I don't know regex is pattern searching not a parse tech.
-
watzon45877y@skprog pretty much. Regex comes in very handy when building a parser, but it isn’t a parser itself. I have written several parsers for fun over the past month and I highly recommend the exercise
-
DrEmann2537ySurprised you didn't link to this stackoverflow answer https://stackoverflow.com/a/1732454
Related Rants
Use regex to parse HTML.
undefined
wk66