# regsub_expand

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

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

## Parameters

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

## Called by

- [`regsub`](/en/tmux/latest/reference/c-function-regsub/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/regsub.c#L100)

## Calls

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