TestWebSedProcessor

Following is output from the WebSed processor.

Data for this test is on the page WebSedTestData


Test different sources [edit section]

In the examples below, a different page (either external or internal) is parsed to find Tim's phone number.

Parse a local page [edit section]

Result parsing a single field from a local page:

The following lines should match:


Tim's phone number is 555-6895
Tim's phone number is 555-6895

Parse from a localhost URL [edit section]

Result parsing a single field from a url (http://bird.org/tbw-files/UserTimTestWebsed.html)

The following lines should match:


Tim's phone number is 123-4567
Tim's phone number is 123-4567

Parse from a fixed external URL [edit section]

Result parsing a single field from a url

The following lines should match:


The type of sample is: "text"
The type of sample is: "text"

Test different match specifications [edit section]

simple match expressions [edit section]

multi-line matches (endpat) [edit section]

The following sections should match:
The lines inside the block are:
this is multi-line data; this is the second line of multi-line data
The lines inside the block are:
this is multi-line data; this is the second line of multi-line data


context-sensitive matches [edit section]

This section tests the use of precursors.

The following lines should match:


The cat did eat a rat; place: late a night ; at a location best described as "upon a mat "
The cat did eat a rat; place: late at night; at a location best described as "upon a mat"

The following lines should match:


The squirrel had !not found! !not found! at a location best described as "!not found!"
The squirrel had !not found! !not found! at a location best described as "!not found!"

anonymous sequences [edit section]

The following lines should match:
I believe that the red bicycle might have been ruined in a crash .
I believe that the red bicycle might have been ruined in a crash.

controlling the search space [edit section]

empty format spec [edit section]

The following sections should match:


missing match [edit section]

This tests when a match is missing from the source data

The following lines should match:


The missing data is: "!not found!"
The missing data is: "!not found!"