I’m trying to create regex to select only few items from drop down list in my grafana dashboard
Regex which is working in regex101 is not not working here.
Sample Data in the menu drop down coming from a variable:
Intl_New_City_Highway,
Intl_New_City_Track_Pathway,
USA_NY_Newyork_City_Buildings,
USA_NJ_Newark_City_Track,
USA_CA_New_City_Napa_Track,
Space_New_City_Track_Field,
USA_LA_NewOrleans_City_Track,
USA_NewMexico_Albuquerque_City_Building
Below regex string in regex101 gives me (New_City_Track)
This works for me in regex101, but not in grafana. (New_City_Track)
The static values are defined in variables for this use case.
I’m using the regex in the drop down menu in the dashboard.
I’m expecting only two values (below) to remain in the drop down out of seven values, when I put this regex in the drop down search ( (New_City_Track) ) :
By the way, what worked in Grafana v9.5.x is not working in Grafana v10.5.x
As suggested by this post, the pattern /^(New_City_Track)$/ doesn’t work in Grafana v10.4.x
While i’m expecting only 2 results, as provided by regex101 as well,