I
am working on the trade doubler feed for dialaphone, it contains the field moreinfo which contains all none tradedoubler standard fields, for example
Quote:
|
Line Rental: 45.00; Manufacturer: Nokia; Tariff: Video, Talk&Text 1100 - 600 Xnet Mins 400 Texts; ContractMinTerm: 12; Network: Three; Model: MPN
|
I
am trying to pull the Tariff using the following preg_match
PHP Code:
$str = "Line Rental: 45.00; Manufacturer: Nokia; Tariff: Video, Talk&Text 1100 - 600 Xnet Mins 400 Texts; ContractMinTerm: 12; Network: Three; Model: MPN";
$do = preg_match("/Tariff: (.*)(; [A-Z])/", $str, $matches);
This returns "Video, Talk&Text 1100 - 600 Xnet Mins 400 Texts; ContractMinTerm: 12; Network: Three"
This is happening as the reg ex is taking the last instance of "; [A-Z]" rather than the first.
Anyone know how this can be done?