# regsub_expand

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/regsub.c#L37
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-regsub-c-regsub_expand/

```c
static void regsub_expand(char **buf, size_t *len, const char *with, const char *text, regmatch_t *m, u_int n)
```

## Parameters

- `buf` (`char **`)
- `len` (`size_t *`)
- `with` (`const char *`)
- `text` (`const char *`)
- `m` (`regmatch_t *`)
- `n` (`u_int`)

## Called by

- [`regsub`](/en/tmux/3.2a/reference/c-function-regsub/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/regsub.c#L98)

## Calls

- [`regsub_copy`](/en/tmux/3.2a/reference/c-function-regsub-c-regsub_copy/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/regsub.c#L49)
- [`xrealloc`](/en/tmux/3.2a/reference/c-function-xrealloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/regsub.c#L55)
