Most asymmetric key generation algorithms will go through many attempts to generate valid keys, often because certain keys are considered weak because they fail predefined tests. In your case, you would simply want an additional test to check if they match your special criteria before being considered valid keys.
Programmatically, if you are using a third-party key generation library, you would have to keep calling the generator until it gave you a pair that met your criteria. If you wrote the generator yourself, it would save some effort to be able to just stick in your criteria as part of the algorithm.
In any case, I agree with the other commentators that this may not be a great idea. If you are requiring a certain part of your key to match a predetermined pattern, you are sacrificing some of your security for something that could easily be uncovered and abused by an unfriendly party.
I'm curious how using a public key as a pseudonym offers anonymity. The key is still associated with a specific private key that is associated with a specific client. It sounds like you're trying to filter based on the key/pseudonym, but perhaps that isn't the best idea. Would encrypted signing help?