views:

385

answers:

1

What's the best way to parse the google search results with Delphi (The API will not work, only allows 10 results)? (I would prefer free options.)

+1  A: 

Have you thought about regular expressions (regex?) Apparently you need a 3rd party library. Here's a nice overview page for regex with Delphi.

Paul Sasik
yeahI've though of RegEx: http://stackoverflow.com/questions/2122757/delphi-regex-question I asked the question, and didn't get much info on RegEx. Maybe you know more about RegEx than they do and could help me with the problem.. :P
Scott Tyler
@Scott: i checked that other SO question you posted. i do think RegEx is your best option, you just need to work with it. The regex bit you have with your Delphi code there is very complex, best to tackle it in pieces. You can also use little utils like this one: http://regexhero.net/tester/ to test your regex. (i use that one all the time.) And... i wouldn't necessarily try to parse all of HTML. i think that if you concentrate on the Google results you'll do ok.
Paul Sasik
Thanks for the info on regexhero.. it helped me figure out the RegEx for this.
Scott Tyler