# E4234

Compiler diagnostic name: `regex_kind_mismatch`.

The regex kind does not match the input kind. Text regexes (`re"..."` and
`Regex` constants) match text; byte regexes (`reb"..."` and `BytesRegex`
constants) match bytes.

## Erroneous example

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

## Suggestion

Use a text regex for text input, or a byte regex for byte input. Changing the
regex kind does not convert the input between text and bytes.

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