[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.4 $EXTRACT

Extracts a substring of a string.

The first argument is the source string.

The optional second argument specifies the starting position of the substring to extract, and defaults to 1.

The optional third argument specifies the ending position of the substring to extract, and defaults to the value of the second argument, or 1.

This example will extract the string FreeM into the local variable M.

SET NAME="FreeM is the best!"
SET M=$EXTRACT(NAME,1,5)

This document was generated on January 3, 2022 using texi2html 5.0.