I have a guide here on how to make something akin to what you are trying to do.
It isn’t perfect since we don’t have regex search, but it gets quite close. I’ll prob make an update in the future since there is a new block that should make it a little easier and more dynamic.