Systematic evolution of ligands by exponential enrichment (SELEX), also referred to as in vitro selection or in vitro evolution, is a combinatorial chemistry technique in molecular biology for producing oligonucleotides of either single-stranded DNA or RNA that specifically bind to a target ligand or ligands. These single-stranded DNA or RNA are commonly referred to as aptamers. 
Although SELEX has emerged as the most commonly used name for the procedure, some researchers have referred to it as SAAB (selected and amplified binding site) and CASTing (cyclic amplification and selection of targets) SELEX was first introduced in 1990. In 2015, a special issue was published in the Journal of Molecular Evolution in the honor of quarter century of the discovery of SELEX.
The process begins with the synthesis of a very large oligonucleotide library, consisting of randomly generated sequences of fixed length flanked by constant 5 and 3 ends. The constant ends serve as primers, while a small number of random regions are expected to bind specifically to the chosen target. For a randomly generated region of length n, the number of possible sequences in the library using conventional DNA or RNA is 4 (n positions with four possibilities (A,T,C,G) at each position). The sequences in the library are exposed to the target ligand - which may be a protein or a small organic compound - and those that do not bind the target are removed, usually by affinity chromatography or target capture on paramagnetic beads. The bound sequences are eluted and amplified by PCR to prepare for subsequent rounds of selection in which the stringency of the elution conditions can be increased to identify the tightest-binding sequences. A caution to consider in this method is that the selection of extremely high, sub-nanomolar binding affinity entities may not in fact improve specificity for the target molecule. Off-target binding to related molecules could have significant clinical effects.
SELEX has been used to develop a number of aptamers that bind targets interesting for both clinical and research purposes. Nucleotides with chemically modified sugars and bases have been incorporated into SELEX reactions to increase the chemical diversity at each base, expanding the possibilities for specific and sensitive binding, or increasing stability in serum or in vivo.