I am creating a variable in Grafana from a mongoDB query. Currently my query returns an array of items in the format of:
name="Bob Hansen", id="8051240138eb2ea033aa21f3"
name="John Doe", id="4051240138eb2ea033aa21f3"
...
Now I am trying to use regex to extract the two key/value pairs like described here: https://grafana.com/docs/grafana/v9.0/variables/filter-variables-with-regex/#filter-and-modify-using-named-text-and-value-capture-groups
I have the following regex:
/name="(?<text>[^"]+)|id="(?<value>[^"]+)/g
But grafana keeps returning no values, unless I remove the regex :(