by ircambridge · 13y ago · 0 comments
If 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.)
Well, for starters, if you're not using Javascript. All four tools you mentioned are Javascript-based.
The only real reason to use regexes is when dealing with html so broken that parts of it are inaccessible through parser.