I want to grab the Google search rank for a site based on a keyword. As an example www.salarymap.com/ ranks in this search for salary finder. A regular expression to grab the number (in my case today I see www.salarymap.com/ as 13.) is a little beyond my current regular expression skill set. http://www.google.com/ie?q=salary+finder&num=100&hl=en&btnG=Search Any help with a search rank regular expression is appreciated.
Didn't test, but assuming you have the content of that google page in $googlecontent : <?php $data = explode("<nobr>",$googlecontent); foreach($data as $line) { if(preg_match("/www\.salarymap\.com/",$line)) { if(preg_match("/([0-9]){1,}/",$line,$regs)) { print $regs[1]; } } } ?> PHP: This is a VERY big guess and not really a good regex example :$