The central dogma of biology-that DNA makes RNA makes protein-was recently expanded yet again with the discovery of RNAs that carry important regulatory functions (e.g., metabolite-binding RNAs, transcription regulation, chromosome replication). Thus, rather than only serving as mediators between the hereditary material and the cell's workhorses (proteins), RNAs have essential regulatory roles. This finding has stimulated a search for small functional RNA motifs, either embedded in mRNA molecules or as separate molecules in the cell. The existence of such simple RNA motifs in Nature suggests that the results from experimental in vitro selection of functional RNA molecules may shed light on the scope and functional diversity of these simple RNA structural motifs in vivo. Here we develop a computational method for extracting structural information from laboratory selection experiments and searching the genomes of various organisms for sequences that may fold into similar structures (if transcribed), as well as techniques for evaluating the structural stability of such potential candidate sequences. Applications of our algorithm to several aptamer motifs (that bind either antibiotics or ATP) produce a number of promising candidates in the genomes of selected bacterial and archaeal species. More generally, our approach offers a promising avenue for enhancing current knowledge of RNA's structural repertoire in the cell.