Archive

Posts Tagged ‘match all’

Php Preg_match_all

August 5th, 2009 Comments off

I need a php function that does a preg_match_all against http://listings.ebay.com and produces an array that has:

parent category name
sub category name
category code

For example:

20081:”Antiques”:;
37903:”>Antiques”:”Antiquities”;
4707:”Antiques”:”Architectural & Garden”;
20082:”Antiques”:”Asian Antiques”;

My goal is to be able to have a list of categories and category codes for ebay, and be able to update that list on a regular basis.

The completed code should be able to write a .txt file, that has the array as described above.

Additionally, a php program should be able to open the file, and build a select list from the stored text that will look as follows:

<option class=’catlist’ value=’20081′>Antiques</option>
<option class=’catlist’ value=’37903′>Antiques: Antiquities</option>
<option class=’catlist’ value=’4707′>Antiques: Architectural & Garden</option>
<option class=’catlist’ value=’20082′>Antiques: Asian Antiques</option>
<option class=’catlist’ value=’2195′>Antiques: Books & Manuscripts</option>

Php Preg_match_all Regex

June 24th, 2009 Comments off

Provide a PHP regular expression for the pre_match_all function that parses for specific information and returns the result in an array.

Please see attachment showing example text and the information to be parsed. One example has the information to be parsed as VAR1, VAR2, VAR3 … VAR15, VAR16. The second example has “live” data.

Script should work on a linux server using PHP version 4.3.

Payment made (via escrow if you prefer) on successful test of your regex expression on your server using another web page similar to the test page to parse.

Indicate previous experience in your reply or via PM that indicates your ability to complete this job along with bid and expected completion date.

Thank you.

Php Preg Match All Problem

March 19th, 2009 No comments

This is a quick review and quick project for someone who is very familiar with PHP.

Im using the fopen function to read the HTML of a certain website. In the Webpage HTML, there is this code:

messages, 4.95)

I need to use preg_match_all to retrieve the 4.95 part and store it in a variable.

If you do not know what I am talking about, please do not bid.

Thanks!

Bear