> For the complete documentation index, see [llms.txt](https://docs.nedyx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nedyx.com/version-1.52-preview/clearlines-functions/text-functions/mid.md).

# 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.&#x20;

#### Examples

<figure><img src="/files/8t22wHEloiInfbmBWSSs" alt=""><figcaption></figcaption></figure>
