# Extract Bracketed Text

This function is used to look for text, within a field or named variable, bracketed by one of (), [ ], < >, or { }.

If the From the end option is selected the last occurrence will be extracted. If the option is not selected, the first occurrence will be selected.

The text within the chosen delimiters will be copied to the specified destination. If a delimiter match did not occur the destination will be cleared.

If the Remove option is selected the text and its enclosing delimiters will be removed from the source. You can optionally elect to insert text to mark the location of the removed text.

All text strings may contain any of the escape sequences described in Escape Sequences.

When run Grouped, the action test state is set to true if an extraction occurred, otherwise it will be set to false. When run Stepwise, the action test state is set to true if any extractions occurred, otherwise it will be set to false.

Note that when a named variable is used, both the source and destination must be named variables. When executing stepwise and named variables are used, the statement is only executed once.