How To Convert A Variable Value to Lowercase Using Regex

I have a value that I have defined in a Query variable and the results are being returned as uppercase value. That is by design.

However there are certain instance where I’d like to use this value in a query but the query requires that same value to be in lower cases.

MyVariable, type query, values “ABC,DEF,GHI”, not a multi-select variable.
Panel Query(CloudWatch Datasource Log Group): /aws/ecs/containerinsights/api-def/cluster/performance

What I’d like to do is use the lowercase version of the MyVariable value: “DEF”. Like this:


So, I’m looking for function that I can use for uppercase this value. Something like: ${myvariable}.ToUpper (I know that doesn’t exist, it was just an example). I know that Regexes can be use elsewhere, is it possible to do it here inline when specifying the Log Group?