vmware_vm_facts - limit to set of matched names

Is it possible to limit the vmware_vm_facts module to only return a subset of regex-matched vms?

Big picture: I have a hostname standard that, in part, goes by a sequence # e.g. something-app-prod3a (where 3 is the sequence number). To ensure that all hostnames are unique, I need to check what the highest sequence number is. If there is no match, start at 1, otherwise it is existing_name + 1. So, I need to check for anything leading up to the number for a match, strip off the last letter, get that number and do stuff with it.

Maybe there is a better way to accomplish what I need? I can get a list of all vms with vmware_vm_facts, but that takes a loooong time (nearly 6 minutes) and doesn’t seem to be necessary. Potentially the right answer is to do this in a separate script, but would rather keep everything ansible-native if possible.