Using variable in regex seems not to work

Hi,
I try to use a variable in metric definition with a prometheus datasource:
node_load1{node=~".$project."}
with $project defined as a constant

It doesn’t work defined as this.
I tried some escape character with no more success.

any clue ?