Problem

Web crawling. Modify the solution of Exercise 5.1.31 to develop a program that prints all...

Web crawling. Modify the solution of Exercise 5.1.31 to develop a program that prints all web pages that can be accessed from the web page given as a command-line argument.

EXERCISE 5.1.31

Harvester. A Java Pattern object is a representation of a regular expression. Such an object can be used to build a Matcher object for a given string. You can think of a Matcher object as a representation of an NFA for the RE. Operations on Matcher objects include find(), which finds the next match of the RE in the string, and group(), which returns the string characters that led to the match. Write a Pattern and Matcher client that takes a file name (or URL) and an RE as command-line inputs and prints out all the substrings in a file that match the RE.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 5.1