qcount

Counts the number of lines containing an occurrence of one regular expression in a file before another regular expression is encountered.

Syntax

qcount("string1", "string2")

Inputs

string1
The string to count
string2
The string marking the end of the search

Comments

This function counts the number of lines containing the specified string.

qcount stops searching when it encounters a line containing string2 or when it reaches the end of the file. The current file position will either be the start of the line containing string2 or the end of the file.

If string1 is never found, qcount generates a failure condition.

Like all functions, qcount can only be used on the right-hand side of a set statement.

Example

set items = qcount("Node+", "END DATA")