nge Problen rou are in the market to buy a blue pick-up truck, and you wish to develop an automated web searching program (a spider) to search daily through various online newsgroups and classified ad websites to find text containing the word blue and the phrase pick up truck close to each other, followed by a price. Specifically, you should match the words blue and the phrase (pickup/pick-up/pick up) truck separated by at most two other words or numbers (such as a year) in between. The pick-up truck phrase could appe pefore or after the word blue. After the words blue and the phrase pick-up truck, the text should also contain a price, and you should be able to simply re-use your price regular expression you developed previously. Exercise 18 Test Strings: Test Suite: (Should be ACCEPTED) SEJECT: blue pickup truck $5000 REJECT: blue picikup truck s5,000 REJECT: blue piekup sruck $1,234.56 RESECT: blue pick-up truck 85000 RECECT: blue piek up truck $5000 REJECT: blue toyota pick-up truck 85000 REJECT: blue toyota 1993 psek-up sruek $5000 EJECT: blah blah blue toyota 1993 piek-up truck blah blah 85000 blah REJECT: piekup truek blue 85000 REJECT: piek-up truck 1993 teyota blue 35000 REJECT: blah blah blah piek-up truck teyota 1993 blue blah blah blah 15000 REJECT: desperate: blue 1993 toyota piekup truek for sale. 82, 000 e.b.o. REJECT: toy pickup truck REJECT: blue blue pickup piekup truck truek 15000. Test Suite: (Should be REJECTED): REJECT: blue cherry blue: 012. xonas 1saas REJECT: blue piekup sruek REJECT: blue 35000 REJECT: piekup sruek 5000 BEJECT: blue truek 85000 REJECT: 85000 blue pickup truck RESECT: blue car 15000 REJECT: blue toyota 1993 piek-up truck REJECT: blue 1993 toyota sutomatie pick-up truck 15000 REJECT: fblue's pick-up truck sold for $5000 SEJECT: pick-up trueks by fblue: $5000 REJECT: biuedy for saie piekup truek: 85000)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Exercise 18: Challenge Problem
You are in the market to buy a blue pick-up truck, and you wish to develop an automated web searching program (a spider) to search daily through various online newsgroups and classified ad websites to find text containing the word blue and the phrase pick-
up truck close to each other, followed by a price. Specifically, you should match the words blue and the phrase (pickup/pick-up/pick up) truck separated by at most two other words or numbers (such as a year) in between. The pick-up truck phrase could appear
before or after the word blue. After the words blue and the phrase pick-up truck, the text should also contain a price, and you should be able to simply re-use your price regular expression you developed previously.
Exercise 18
Test Strings:
Test Suite: (Should be ACCEPTED)
REJECT: blue pickup truck $5000
REJECT: blue pickup truck $5,000
REJECT: blue pickup truck 81,234.56
REJECT: blue pick-up truck $5000
REJECT: blue pick up truck $5000
REJECT: blue toyota pick-up truck 8500o
REJECT: blue toyota 1993 pick-up truck 85000
REJECT: blah blah blue toyota 1993 pick-up truck biah blah 85000 blah
REJECT: piekup truck blue $5000
REJECT: pick-up truck 1993 toyota blue $5000
REJECT: blah blah blah pick-up truck toyota 1993 blue blah blah blah 85000
REJECT: desperate: blue 1993 toyota pickup truck for saie. $2,000 o.b.o.
REJECI: toy pickup truck - cherry blue: $12.
REJECT: blue blue pickup pickup truck truck 35000.
Test Suite: (Should be REJECTED):
REJECT: blue
REJECT: truck
REJECT: pickup truck
REJECT: blue pickup truck
REJECT: blue $5000
REJECT: pickup truck 85000
REJECT: blue truck 5000
REJECT: 85000 blue pickup truck
RECECT: blue car 15000
REJECT: blue toyota 1993 pick-up truck
REJECT: blue 1993 toyota automatic pick-up truck $5000
REJECT: fblue's pick-up truck sold for s5000
REJECT: pick-up trucks by fblue: $5000
REJECT: bluedy for sale pickup truck: $5000)
Transcribed Image Text:Exercise 18: Challenge Problem You are in the market to buy a blue pick-up truck, and you wish to develop an automated web searching program (a spider) to search daily through various online newsgroups and classified ad websites to find text containing the word blue and the phrase pick- up truck close to each other, followed by a price. Specifically, you should match the words blue and the phrase (pickup/pick-up/pick up) truck separated by at most two other words or numbers (such as a year) in between. The pick-up truck phrase could appear before or after the word blue. After the words blue and the phrase pick-up truck, the text should also contain a price, and you should be able to simply re-use your price regular expression you developed previously. Exercise 18 Test Strings: Test Suite: (Should be ACCEPTED) REJECT: blue pickup truck $5000 REJECT: blue pickup truck $5,000 REJECT: blue pickup truck 81,234.56 REJECT: blue pick-up truck $5000 REJECT: blue pick up truck $5000 REJECT: blue toyota pick-up truck 8500o REJECT: blue toyota 1993 pick-up truck 85000 REJECT: blah blah blue toyota 1993 pick-up truck biah blah 85000 blah REJECT: piekup truck blue $5000 REJECT: pick-up truck 1993 toyota blue $5000 REJECT: blah blah blah pick-up truck toyota 1993 blue blah blah blah 85000 REJECT: desperate: blue 1993 toyota pickup truck for saie. $2,000 o.b.o. REJECI: toy pickup truck - cherry blue: $12. REJECT: blue blue pickup pickup truck truck 35000. Test Suite: (Should be REJECTED): REJECT: blue REJECT: truck REJECT: pickup truck REJECT: blue pickup truck REJECT: blue $5000 REJECT: pickup truck 85000 REJECT: blue truck 5000 REJECT: 85000 blue pickup truck RECECT: blue car 15000 REJECT: blue toyota 1993 pick-up truck REJECT: blue 1993 toyota automatic pick-up truck $5000 REJECT: fblue's pick-up truck sold for s5000 REJECT: pick-up trucks by fblue: $5000 REJECT: bluedy for sale pickup truck: $5000)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Probability Problems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education