Thomas Dalton wrote:
Technically, that's not necessary.
You know that these things only change on save, so at that point you look at the difference between the old aliases and the new and update the master set. Computationally, it's only a smidgen more expensive than our current approach. And given that we're such a read-heavy environment, unnoticeably so.
Not using regular expressions, you can't. Regexps are good for telling if a string matches a pattern, they aren't good for producing a list of all strings that match a pattern (which could be infinitely long if you allow arbitrary patterns). A much simplified version of regexps could be used, but I'm not sure if it's worth it.
Actually, the limited form of regexes that Steve suggested should always produce a finite list. So I think it would work.
Even if you needed the full power of regular expressions, you could still build something pretty workable in our environment by keeping the list hot and doing some partitioning and caching. But we don't need that, so the simple solution would work.
William