# `Fun_Get_BracketContent` (function)


- **Type:** FUNCTION
- **Returns:** `varchar(100)`
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `userstr` | `varchar(100)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_Get_BracketContent`'`._

## Narrative

**Business context:** Tiny string-utility — returns the contents of the first `[…]` bracket pair in the input. Building-block for the formula-resolution path that needs to extract one placeholder name at a time.

**What it does:** one line: `substring_index(substring_index(userstr,']',1),'[',-1)`. Splits at the first `]`, takes the part before it, then splits that at `[` and returns everything after the last `[`. No table access.

**Invocation:** called by [`Fun_Get_BracketContentAll_JSON`](Fun_Get_BracketContentAll_JSON.md), which loops to extract every `[…]` token in a string. No other caller in any channel.
