What regex language is used in dashboard->settings->variables?

TL;DR; Where do I go to learn more about regular expression syntax used in variables to filter dashboard panels?

I’m using version 9.2.1. I’m trying to setup variables to only match certain interfaces on cisco switches. I’m not having luck with the regexes I’ve been trying. What regex language does grafana use for the query options under variables?

I’m trying to return interface names like:

And exclude interface names with certain strings like “Controlled” and “Vl”.

I’m not certain if I should be using the regex to filter the response I want, or if it should be part of the query. I’m using label_values(ifName) to pull all of the interface names. I came up with “^(Gi|Te|Po)\d+((/\d+)+(.\d+)?)?” at regex101 using golang, but that doesn’t work in grafana and I don’t even know if it should.

The regex pseudo code would be, "(Gi or Te or Po) followed by digits and maybe a (/ and more digits) maybe repeated, excluding anything with strings “Controlled” and “Vl”…if that makes sense.

You can try this on www.regex101.com with flavor Golang. Here is a direct link with filled data and regex:

Hi @lonelysysop,

Are those names what you want as a result or are they original/input names?

Can you share full names of interfaces and what result you would like to get?

Best regards,