# E4208

Compiler diagnostic name: `unknown_regex_match_binding`.

Unknown regex match binding.

Regex match expressions support only the special bindings `before` and `after`
beside the matched regex itself. `before` binds the unmatched prefix and `after`
binds the unmatched suffix.

## Erroneous example

```{literalinclude} /sources/error_codes/4208_error/top.mbt
:language: moonbit
```

`middle` is not a supported regex match binding label.

## Suggestion

Use `before` or `after`, or bind the regex itself with `as`.

```{literalinclude} /sources/error_codes/4208_fixed/top.mbt
:language: moonbit
```
