contents.gifprev1.gifnext1.gif

SPAN

Description:

SPAN locates a pattern as specified by its parameters. SPAN returns a pattern of one or more characters as set by the expressions in the buffer, range, or string defined in the first parameter. SPAN matches characters until it reaches one that is not located in the buffer, range, or string or until it reaches the end of a line

Use SPANL to cross line boundaries.

Syntax:

pattern := SPAN ( {buffer | range | string} )

Example:

The following finds the longest pattern containing only digits up to a line boundary:

hello := SPAN ("0123456789");

Errors:

TPU$_CONTROLC Execution aborted by [CTRL-C].

Related Builtins:

SCAN

SPANL