# format_replace_expression

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4911
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-format-c-format_replace_expression/

```c
static char * format_replace_expression(struct format_modifier *mexp, struct format_expand_state *es, const char *copy)
```

## Parameters

- `mexp` (`struct format_modifier *`)
- `es` (`struct format_expand_state *`)
- `copy` (`const char *`)

## Called by

- [`format_replace`](/en/tmux/3.7c/reference/c-function-format-c-format_replace/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5504)

## Calls

- [`format_choose`](/en/tmux/3.7c/reference/c-function-format-c-format_choose/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4978)
- [`xasprintf`](/en/tmux/3.7c/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L5038)

## Other function references

- [`strtonum`](/en/tmux/3.7c/reference/c-function-strtonum/) (function)

## Referenced declarations

- [`format_modifier.argc`](/en/tmux/3.7c/reference/c-struct-format_modifier-argc/) (attribute)
- [`format_modifier.argv`](/en/tmux/3.7c/reference/c-struct-format_modifier-argv/) (attribute)
- [`format_expand_state`](/en/tmux/3.7c/reference/c-struct-format_expand_state/) (struct)
- [`format_log`](/en/tmux/3.7c/reference/c-define-format-c-format_log/) (constant)
- [`FORMAT_MAX_PRECISION`](/en/tmux/3.7c/reference/c-define-format-c-format_max_precision/) (constant)
- [`format_modifier`](/en/tmux/3.7c/reference/c-struct-format_modifier/) (struct)
