scraping data from another site

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
ojsimon
Forum Newbie
Posts: 24
Joined: Sat Mar 31, 2007 5:01 am

scraping data from another site

Post by ojsimon »

I have been trying for ages unsucessfully to write a regular expresion parser for php that will get the best price from any product page at pricerunner.com, please help
Thnaks

feyd | I couldn't find a reason this post was in the welcome thread, so it's been split.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

If you're looking for dollars something like this will probably do:
~\$(\d+(?:\.\d+)?)~

array_map() with floatval() and max() should help with the rest.
Post Reply