# Using variable in regex seems not to work

**URL:** <https://community.grafana.com/t/using-variable-in-regex-seems-not-to-work/25029>\
**Category:** Prometheus\
**Created:** [January 22, 2020, 2:45pm UTC](https://community.grafana.com/t/using-variable-in-regex-seems-not-to-work/25029 "2020-01-22T14:45:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tde](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@tde](https://community.grafana.com/u/tde)\
**Post date:** [January 22, 2020, 2:45pm UTC](https://community.grafana.com/t/using-variable-in-regex-seems-not-to-work/25029/1 "2020-01-22T14:45:19Z")

</div>

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 ?
