You can define the anchors in the example source document. The Parser learns how to parse the document by examining the anchors and the delimiters that separate them. For more information about delimiters, see
Formats Overview.
For example, suppose you have specified that your document uses a tab-delimited format. A line in the example source reads
First name:<tab>Ron
where
<tab>
is a tab character.
You can define
First name:
as a
Marker
anchor. You can define
Ron
as a
Content
anchor. The Parser learns from these definitions that it should search a source document for the string
First name:
. It should then skip over a single tab delimiter and retrieve the text that follows the tab.
Suppose you run the Parser on another source document, which contains the following text:
First name:<tab>Jack
The Parser finds the anchors as above and retrieves the text
Jack
.
Now suppose that the source document reads:
First name:<tab>Jack<tab>Age:<tab>34
The Parser still retrieves the text
Jack
, rather than
Jack<tab>Age<tab>34
. This works because you have defined the tab character as a delimiter. The Script understands that the
Content
anchor starts after the first tab and ends before the second tab. Of course, you might define additional anchors that retrieve Jack's age, which is
34
.
The above examples describe one possible behavior of the anchors and delimiters. The anchors have many properties that let you alter this behavior. For instance, you can define a