Grafana Regex is not working as expected

Hell to all,

We are trying to get some data from Oracle tables, do some transformation using Regex, and display the output. Regex is working and find the data, but the output is not working. We are getting a date in format YYYYMMDD and would like to transform it as DD/MON/YYYY. We tested the Regex using Notepad++ Regex and it is working as expected, but it is not working on Grafana. Can someone help us with that?

Regex input
Regex output

With respect and best regards


I was looking into Grafana docs, and in this link regex | Grafana Loki documentation it says that Grafana Regex engine is based on “RE2” syntax and it seems this syntax did not support conditional operators.

Maybe we need to open a enhancement request in order to ask for Grafana developers start to use a more robust regex engine, in order to attend others requirements.

With respect and best regards

Hi @ancesar,

Welcome to the :grafana: community support forums !!

I was actually working on the timestamp conversion this week and found like you that either can use the Transformation function OR can also use Overwrite function.

If the Transformation did not help you then please have a look at this post where I created a small screencast on how to convert the timestamp into YYYY-MM-DD

For your other question regarding the REGEX, well I will be honest that I do not have that much expertise on this topic. But if you think this might be a bug as you already have done testing, then I can recommend opening this as an issue on our OSS GitHub repository at this link