Productions

Top  Previous  Next

Examples > GrepUrls > Productions

 

If you look at the text of an html page, which normally is show in the browser, the following for example is a link to the pages of the TextTransformer:

 

<a href="http://www.texttransformer">

 

If the text enclosed into quotes - the URL - begins with "http://www.", the link refers to an external web page. Exactly that is, what shall be found here. Two simple productions fulfill the purpose :

 

GrepUrls ::=

 

(

Url

| SKIP

)*

 

Url ::=

 

"<a href=\"http://www."

SKIP

"\""

 

A html page consists of the desired URL's and other text. The URL is introduced by "<a href=\"http://www." and extends up to the next quote mark.

 

The case-sensitivity is deactivated in the project options, as HTML is case insensitive. So tags like

 

"<A HREF=\"http://www."

 

are found too.

 

 



This page belongs to the TextTransformer Documentation

Home  Content  German