Advertisement

10.11.2006 at 12:36PM PDT, ID: 22021107
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

Pattern Matching Help - Part II

Asked by teksavers in Perl Programming Language

Tags: ,

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=123456789112
Cisco 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=123456789112
CISCO 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=123456789112
Brand 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
[+][-]10.11.2006 at 02:32PM PDT, ID: 17710948

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.12.2006 at 10:25AM PDT, ID: 17717365

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.12.2006 at 11:21AM PDT, ID: 17717885

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.12.2006 at 11:48AM PDT, ID: 17718162

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.12.2006 at 12:21PM PDT, ID: 17718498

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.12.2006 at 12:23PM PDT, ID: 17718506

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.05.2006 at 07:38PM PST, ID: 18082293

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12.05.2006 at 07:52PM PST, ID: 18082379

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: matching, pattern
Sign Up Now!
Solution Provided By: jmcg
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32