It sounds like you want to use a tool like phi-blast to do pattern searches. (see http://www.ncbi.nlm.nih.gov/BLAST/producttable.shtml for a selection guide to the NCBI programs). There is a pointer from that table to documentation about the program: Pattern-Hit Initiated (PHI) BLAST is designed to search for proteins that contain a pattern specified by the user, AND are similar to the query sequence in the vicinity of the pattern. This dual requirement is intended to reduce the number of database hits that contain the pattern, but are likely to have no true homology to the query. To run PHI-BLAST, enter your query (which contains one or more instances of the pattern) into the "Search" box, and enter your pattern into the "PHI pattern" box in the "Options" section. Patterns must follow the syntax conventions of PROSITE. The documentation on Pattern Syntax is at: http://www.ncbi.nlm.nih.gov/blast/html/PHIsyntax.html.