git can do regex matching of tags for us. For example,
```
git --git-dir=CACHE/opt/blah tag -l zlib-1.2.8-78878d854e09c46c0958aaf7b81e4c152c1ac240c3faa602c3f71f95e2e10c31
zlib-1.2.8-78878d854e09c46c0958aaf7b81e4c152c1ac240c3faa602c3f71f95e2e10c31
```
With no output returned if no matching tag. You can also do globbing, so you could do `tag -l zlib-*`.