# Grafan templating regex

**URL:** <https://community.grafana.com/t/grafan-templating-regex/4194>\
**Category:** Grafana\
**Tags:** templating\
**Created:** [December 6, 2017, 11:19am UTC](https://community.grafana.com/t/grafan-templating-regex/4194 "2017-12-06T11:19:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![upul](https://avatars.discourse-cdn.com/v4/letter/u/9dc877/32.png) [@upul](https://community.grafana.com/u/upul)\
**Post date:** [December 6, 2017, 11:19am UTC](https://community.grafana.com/t/grafan-templating-regex/4194/1 "2017-12-06T11:19:40Z")

</div>

Hi,

I am using grafana (4.6). In there I need to filterout the things that I not wanted in the templating section.  
ex: I can use like this - Regex = /abc|xyz|/ from ( abc , xyz , pqr, 123)

But I need to avoid only xyz, So, If there any way to use not equal function and use all the things except ‘xyz’. How can I get this ? Please support to this.

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [December 22, 2017, 3:58pm UTC](https://community.grafana.com/t/grafan-templating-regex/4194/2 "2017-12-22T15:58:52Z")

</div>

Hi,

Maybe something like this:

```auto
/^((?!(xyz)).+)*$/

```

Marcus
