Strip

Filter:

STRIP

Syntax:

STRIP [scope] STRING delimiter charstring delimiter

Operands:

scope :: BOTH | LEADING | TRAILING
charstring :: any ASCII string of characters.
delimiter :: any character not used in the character string

Functional Description:

Use the STRIP stage to remove leading or trailing characters from records. STRIP reads records from its primary input stream, removes the specified characters, and writes the resulting records to its primary output stream, if it is connected. If no operands are specified, STRIP removes leading and trailing blanks from the records. Use the STRIP stage to replace a string of characters with another string of characters.

BOTH removes consecutive occurrences of the specified character or characters from the beginning and the end of the records. BOTH is the default.

LEADING removes consecutive occurrences of the specified character or characters from the beginning of the records.

TRAILING removes consecutive occurrences of the specified character or characters from the end of the records.

Synonyms:

none

Usage Notes:

The following example will remove all spaces from the front and back of the records.

STRIP

The following example will remove all trailing Xs from all records.

STRIP TRAILING STRING /X/

The following example will remove all leading and trailing "ABC" from all records.

STRIP BOTH STRING /ABC/



JAVA Pipelines

Cullen Programming logo