Positional Matchers

Beginning of File

BOF, BOS

Matches beginning of stream/file

output type:none
quantifier:none
configuration:none

Example Extracting the first line in the file:

"name";"age"
Homer Simpson;40
Charles Montgomery Burns;104

Results in the first line parsed into the header field. Parsing following lines fails, as they do not begin at the start of file marker.

header _unmatched
‘’name’’;’’age’’ NULL
  {pos=13 len=46 data=’’Homer Simpson;40 Charles Montgomery Burns;104’’}

Middle of File

MOF, MOS

Matches any bytes in the middle of file/stream

output type:none
quantifier:none
configuration:none

Example: extracting records after the first row in the file

"name";"age"
Homer Simpson;40
Charles Montgomery Burns;104

Results in lines 2 and 3 parsed to fields name and age. Line 1 fails to parse as it begins with the beginning of the file marker.

name age _unmatched
  -1 {pos=13 len=46 data=’’<LF’’>}
Homer Simpson 40 NULL
Charles Montgomery Burns 40  

End of File

EOF, EOS

Matches end of file/stream

output type:none
quantifier:none
configuration:none

Example: Extracting the last line of the file:

"name";"age"
Homer Simpson;40
Charles Montgomery Burns;104
total:2 persons, average age: 72 years

The following pattern matches only when the last line is followed by the end of file marker:

1
LD:footer EOS

Results in the last line being extracted to the footer field. First three lines fail to parse as they are not the last in the file.

footer _unmatched
  {pos=0 len=59 data=’’name;age Homer Simpson;40 …’’>}
total:2 persons, average age: 72 years NULL