Need help with grafana regex for graphite-1.1.X

I am using graphite-1.1.X version, the problem is I am using pipe(|) symbol in metrics so grafana is not populating any value in the graph.

I have asked the graphite community they told like from grafana 1.0.X they are using pip as a reserved symbol. they are using in a target for some other purpose and they told me to use an escape character with the pipe symbol.

The problem here is $brick_path is a template variable, if it is static metrics then i can give escape character like “|” or something but here I am using an as dynamic variable. Whatever query is written for $brick_path will populate values.

So is there any way to replace | into \| in grafana or how to solve this problem. please suggest me some solution.

other places values are populated, only the metrics which have pipe symbol(|) are causing issue.

for more detail about the question please see this:

any other way to replace or insert new char during template variable, (e.g) need to modify |mnt|data1|1 to \|mnt\|data1\|1 using regex or anything, or any other function to do this in metrics with template variable