I have a variable $body as below and would like to extract the following information for each listing within $body:
$description = Product Description (all text, symbols, numbers, commas, etc.. before the item number (in parantheses))
$itemnum = Item Number (in parantheses)
$sellerid = Seller ID (always after "seller")
Here is a sample $body:
<BEGIN>
On Wednesday, October 11, 2006 11:17:17 AM, Program found these =
newly listed items:
Site - All / Cisco, (4 items):
CISCO LINKSYS WIRELESS G RANGE EXPANDER WRE54G 2.4GHz (123456789112), =
GBP 0.01, shipping GBP 9.99, GBP 0.99 ins. optional, seller sellernum4 =
(7477), payment PayPal, PaymentSeeDescription, =
http://www.site.com/site.dll&item=123456789112Cisco IGS-R MultiProtocol Router Bridge (123456789112), $14.95, =
shipping $18.98, seller sellernum3 (3460), payment PayPal, PersonalCheck, =
MOCC,
http://www.site.com/site.dll&item=123456789112CISCO WS-X6248A-RJ-45 WS-X6248-RJ-45 CAT 6000 SERIES (123456789112), =
$67.89, seller sellernum2 (89), payment PayPal, AmEx, Discover, =
PersonalCheck, VisaMC, MOCC, =
http://www.site.com/site.dll&item=123456789112Brand new Cisco WS-G5486 1000Base-LX GBIC (123456789112), $140.00, =
shipping $19.79, seller sellernum1 (270), payment PayPal, =
PaymentSeeDescription, MOCC, =
http://www.site.com/site.dll&item=123456789112<END>
The script I need would result in the following:
$description = "CISCO LINKSYS WIRELESS G RANGE EXPANDER WRE54G 2.4GHz"
$itemnum = "123456789112"
$sellerid = "sellernum4"
$description = "Cisco IGS-R MultiProtocol Router Bridge"
$itemnum = "123456789112"
$sellerid = "sellernum3"
$description = "CISCO WS-X6248A-RJ-45 WS-X6248-RJ-45 CAT 6000 SERIES"
$itemnum = "123456789112"
$sellerid = "sellernum2"
$description = "Brand new Cisco WS-G5486 1000Base-LX GBIC"
$itemnum = "123456789112"
$sellerid = "sellernum1"
Start Free Trial