The sort() is probably the most expensive thing
you are doing. With the code snippet you've provided,
there doesn't seem to be any need for it. If you really need the sort, sort the matching results rather than the input list of keys.
Are you really doing anything with the (.*) portions
of the regexen ? Reducing the regex to /^$combine/ would
speed it up ( and the other one to /$combine$/ ).