Can you give the full context of what you're trying to do? I don't think I'm grasping the problem.
If you want to identify a track that contains 'Pop' but NOT 'Dream Pop', you can do this:
$If($Contains(<Tag>,Pop)="T",$If($Contains(<Tag>,Dream Pop)="T",False,True),False)
If you want to identify a track that contains both 'Pop' and 'Dream Pop', that's a little tougher but doable (if that's a little hard to read, it checks for 'Dream Pop', then removes 'Dream Pop' from the tag and checks again for 'Pop'):
$If($Contains(<Tag>,'Dream Pop')="T",$If($Contains($Replace(<Tag>,'Dream Pop',),Pop)="T",True,False),False)
It's not so important, but specifically, I was looking for a method of grouping tracks in the sidebar while avoiding the hassle of superfluous tags in cases where multiple values arose. So say, hypothetically, I had split "Pop" and "Rock" between two tabs and I didn't want "Rock" to display in the pop tag for tracks that share both the allotted tag for rock and pop as well as not displaying the pop tag while in the rock tab.
The solution I came up with (the fourth embedded code in my original post) worked exactly how I wanted it to, by (albeit inelegantly) listing each qualifier for the list that applied as desired.
As for the problem, looking at this hypothetically,
$If($Contains(<Grouping>,Rock)="T",Rock,)$If($Contains(<Grouping>,Hardcore)="T",Hardcore,)$If($Contains(<Grouping>,Metal)="T",Metal,)
would display exactly how I want it to (all tracks with Rock, Hardcore, and Metal groupings would display in the sidebar when organized by the virtual tag in question). In a situation where a track had something like "Dream Pop; Rock", it would still display as "Rock" and Dream Pop would not appear, the way it would if I organized by Grouping instead of the virtual tag.
To this end, I had no issue. However, in situations where a search value in the $Contains function (i.e. Dream Pop) contained the value of another listed search value (i.e. Pop), I would get this issue:
This is due to the fact that the string "Dream Pop" also contains the search value "Pop".
This would happen similarly if I made a search value like "Hard Rock"; I'd get a display of "RockHard Rock". I understand why it happens, but I can't find a solution.
This is why I asked if there's any way to make an $If function read values independently when a tag contains multiple values. That way I can go from the code above to something more direct like this:
$If(<Grouping>=Pop,Pop,)$If(<Grouping>=Dream Pop,Dream Pop,)
In situations where the tag only contains one value, this is fine. When it contains multiple values (i.e. "Dream Pop; Rock"), it fails to detect it, because it reads the whole string instead of the independent values.
That's why I also asked if there was a way to make $Contains or $IsMatch just pick up
exactly what's listed as the search value and ignore others. Or any other solution, that is.