Thanks Reamon,
I’m afraid that doesn’t work either. I see someone else complaining about it here.
I suspect that when this was developed they didn’t know the difference between a regular expression and a glob.
But even the glob doesn’t work properly. If I do something like this
%ifvar $index matches('*2')%
it matches
2
12
32
43
52
But not 22!
Bizarre. I think it’s just never worked properly.