# E4205

Compiler diagnostic name: `regex_map_key_not_supported`.

Regex literal is not supported as a map key.

Map literals require ordinary key values. A `re"..."` literal creates a `Regex`,
and regex values are not valid map keys.

## Erroneous example

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

## Suggestion

Use a string key if you want to store the pattern text, or store regex values as
map values instead of keys.

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