Parsing HTML with Regex
stackoverflow.com
Parsing HTML with Regex
1–10 of 34 posts
Re: Parsing HTML with Regex
#2Re: Parsing HTML with Regex
#3Re: Parsing HTML with Regex
#4Re: Parsing HTML with Regex
#5If you know the exact HTML you are working with, using regex to extract the data is in my opinion a superior way of doing it. Less lines and generally less complexity. (Such as taking the name and id of an amazon product from a single site is different from taking all the links out of any page given.)
Re: Parsing HTML with Regex
#6Chuck Norris can parse HTML with regex.
Re: Parsing HTML with Regex
#7I reckon that technically regex is a tool that can be used to parse HTML. It's just that you could only use it in a very trivial way that would be better suited to other tools.
Re: Parsing HTML with Regex
#8You cannot parse HTML with regex. You can find and match strings, but you can't actually parse html with regex. Chuck Norris can parse HTML with regex.
This cracked me up :)
Re: Parsing HTML with Regex
#9Re: Parsing HTML with Regex
#10Xpath is nice for scraping HTML, though it always turns out the stuff you need is in the middle of a bunch of other text.