pc.g

Processing Code/Restore Processor, Releases:

Extracts one or more groups from a string.

Syntax

g{skip.segments} delimiter get.segments

Description

extracts one or more groups of contiguous character substrings delimited by the specified character.

'skip.segments' argument specifies the number of delimited groups to skip before performing the extraction. It must be a single digit numeric, if omitted, zero is assumed, and extraction occurs from the beginning of the value.

'delimiter' may be any single printable character except numerics or the minus sign.

'get.segments' specifies the number of contiguous groups to extract from the value.

Example

The following examples illustrate the results obtained from various
combinations of the 'g' code if the value being processed was the
string: ca*92714*1000:

g*1 ca
g0*1 ca
g*3 ca*92714*1000
g1*2 92714*1000
g2*1 1000
g2*2 1000
g3*1 (null)

See Also

Command Name Type Description
processing.codes Definition Overview of processing codes.
up.input-conversion.adi Processing Code Processing codes available from UP after input.
pc Introductory
pc.group.extract Processing Code see the 'g' processing code.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.