Case insensitive regex in variable

Hi, I’m using a regex in a dashboard variable with a Cloud Flare data source. Grafana version 10.0.0.

I need the regex to be case insensitive but haven’t managed to get it to work using options like “/gi” or “/i“ at the end or “(?i)” before the variable. e.g.

^(.(?i)${environment}.(wss|auth).*)$

Typical variable values are: Production, production, staging, Staging

They all result in invalid regular expression template errors.

Image below. Specially i need the ${environment} variable part to be case insensitive.

Can anyone help?