Regex and variables in InfluxDB query

Hi all -

I’m trying to regex a part of a variable in Grafana/InfluxDB. My variable looks like this:

I now want to select the id part after test via an InfluxDB query. My problem is, I simply don’t get the syntax right and also don’t find examples. Following I tried:

SELECT mean("float") FROM "autogen"."nodes_hist" WHERE ("nodeId" =~ /${test_val:value}(?<=test.)*/) AND $timeFilter GROUP BY time($__interval) fill(none) ORDER BY time DESC

The regex itself (?<=test.)* I confirmed and seems to work but I don’t know how to combine the regex and variable syntactically in the query.