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
(\d{4})(?:(01)|(02)|(03)|(04)|(05)|(06)|(07)|(08)|(09)|(10)|(11)|(12))(\d{2})
Regex output
${14}/(?{2}Jan:?{3}Fev:?{4}Mar:?{5}Abr:?{6}May:?{7}Jun:?{8}Jul:?{9}Aug:?{10}Sep:?{11}Oct:?{12}Nov:?{13}Dec)/${1}

With respect and best regards

Hello,

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