BUILT-IN MATHEMATICA SYMBOL

# Extract

Extract[expr, list]
extracts the part of expr at the position specified by list.

Extract[expr, {list1, list2, ...}]
extracts a list of parts of expr.

Extract[expr, list, h]
extracts parts of expr, wrapping each of them with head h before evaluation.

## DetailsDetails

• Extract[expr, {i, j, ...}] is equivalent to Part[expr, i, j, ...].
• The position specifications used by Extract have the same form as those returned by Position, and used in functions such as MapAt and ReplacePart.
• You can use Extract[expr, ..., Hold] to extract parts without evaluation.
• If expr is a SparseArray object, Extract[expr, ...] extracts parts in the corresponding ordinary array.

## ExamplesExamplesopen allclose all

### Basic Examples (3)Basic Examples (3)

Extract the second part from an expression:

 Out[1]=

Extract a part nested in an expression:

 Out[2]=

Extract parts from multiple positions:

 Out[3]=

Extract the parts given by Position:

 Out[2]=
 Out[3]=