# MID

#### Syntax <a href="#syntax.31" id="syntax.31"></a>

**MID**(*text*; *startPos*; *length*)

* *text* - The text from which a segment is to be returned *- **Value type**: text*
* *startPos* - The position of the first character of the segment within the text *- **Value type**: integer*
* *length* - The length of the returned segment in characters *- **Value type**: integer (optional).*

#### Remarks <a href="#remarks.25" id="remarks.25"></a>

* If *length* is not defined or *startPos* + *length* exceeds the length of the text, **MID** returns all characters after *startPos*.
* **MID** returns an empty text ("") if *startPos* is greater than the length of parameter *text* or if the parameter *length* is 0.

#### Examples

<figure><img src="https://1085786630-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWv5M2BoEVu0kDIV5EPs4%2Fuploads%2Fgit-blob-f257b70bb7b09ddcf0bad71275a21ff41dc5ca62%2Fgrafik.png?alt=media" alt=""><figcaption></figcaption></figure>
