# Bracket

This function is used to look for a string in an item and to ensure that the contents of the item from the string to the end of the item are enclosed in the specified bracket type. The determination as to whether item represents fields, a named variable, a list of fields in a named variable and whether each item is treated as a list, is discussed in Statement Source/Target Determination.

The supplied text fields may contain any of the escape sequences described in Escape Sequences.

You have the option of treating the search for the source string as case and/or diacritic insensitive.

If a match is made for the pattern, old brackets will be removed before the insertion takes place as follows:

- Any sequence of left brackets '( [ < {' immediately before the pattern are removed.
- Any sequence of left brackets '( [ < {' immediately after the pattern are removed.
- Any sequence of right brackets ') ] > }' immediately after the pattern are removed.

For the following statement:

> Bracket "ft. " in the Title field with ( )

The results will be the following:

> A Title (ft. Artist1, Artist2)

for each of the following possible contents of the Title field:

> A Title ft. Artist1, Artist2
> A Title [ft. Artist1, Artist2]
> A Title ft. (Artist1, Artist2)

Field Selection Modes in Tables