The problem is, when I am selecting Line 1 in drop down menu (as shown below), it is showing Line 10 and Line 11 as well because technically “Line 1” is a subset of “Line 10” and “Line11”. How do I solve this if I want the dashboard to show exact match variables (like do not display Line 10 and Line 11 panels when Line 1 is selected).
The =~ indicates matching is done with regexp. So /$line/ means any text where “Line 1” is a part of the string. If you add the anchors ^ to the start and $ to the end you firm up the regexp to only be “Line 1” - /^$line$/. I recommend using https://regex101.com/ to test out your regexes. Very visual and explains a lot of what is going on.
You should also be able to replace the =~ with =, != etc to get string matching in stead of regex