Java regular expressions

A regular expression is a sequence of characters that defines a search pattern for matching strings. Regular expressions can define simple patterns, such as an exact sequences, or complex ones describing variable regions, repetitions, and alternative residues within biological sequences. Motifs described by regular expressions use the Java regular expression syntax. Common syntax components include:

Examples

The following examples illustrate how Java regular expressions can be applied to motifs: