If you want the address only start with certain characters, that's what Vanity Generators do, you can check here:
https://bitcointalk.org/index.php?topic=25804.0Actually you can make more complex rules, but more complex the rule is, more computing power and time are necessary. And for some rules you may have to code yourself.
Edit: this may be of help:
Vanitygen can search for
simple prefixes or
regular expression matches.
Prefixes are exact strings that must appear at the beginning of the address. When searching for prefixes, vanitygen will ensure that the prefix is possible, and will provide a difficulty estimate. Exact prefixes are case-sensitive by default, but may be searched case-insensitively using the
-i option.
Prefixes are also very fast to search, and a list of thousands of prefixes may be specified with little or no reduction in key search rate.
Regular expressions are programmable pattern filters. They are very powerful, and can be used to match prefixes, suffixes, varying-length sequences, etc.. For a quick tutorial, see
http://www.regular-expressions.info/quickstart.html. To enable regular expressions, use the
-r command line option. Unfortunately, regular expressions are very slow, and will have a significant impact on key search rate. Because of this, regular expressions should only be used if their expressive power is needed.