Skip to main content

Table 1 Common regular expressions and the n-of-m pattern type in the 3of5 application Individual common RegEx terms are displayed as they can be applied in 3of5. Types of allowed ambiguities in the individual RegEx terms are listed. "no" no ambiguity; "yes" ambiguity can be expressed with that particular term; "any" ambiguity with any residue allowed. Notes: (1) The general term "ambiguity" used in the text is extended here to "content-ambiguity" to distinguish this from the "length ambiguity"

From: The 3of5 web application for complex and comprehensive pattern matching in protein sequences

Different levels of Regex descriptions Verbal description Example of syntax Potentially content-ambiguous(1) Potentially length-ambiguous
Description of single positions Discrete character in one position K no no
  Subset of characters for one position [KRH] yes no
  Arbitrary character in one position . any no
Description of multiple positions Stretch of identical characters, with fixed length K {3} no no
  Stretch composed of a subset of characters, with fixed length [KRH] {3} yes no
  Stretch of identical characters, with variable length K {1,3} no yes
  Stretch composed of a subset of characters, with variable length [KRH] {1,3} yes yes
  Stretch with arbitrary characters, with variable length . {1,3} any yes
Description of multiple positions of n-of-m Stretch composed of a subset of characters that need to be present with a defined number of matches within sequence of otherwise arbitrary composition, with fixed length (3of5) (KRH) yes no
Description of multiple positions of n-of-m in extended syntax Stretch composed of different subsets of characters that need to be present with defined numbers of matches within sequence of otherwise arbitrary composition, with fixed length (nof5) ((min3) (KRH) (max1) (P)) yes no
Restriction of content of single/multiple positions Any stretch describable by a pattern which should not contain the characters defined in the [^ ] brackets [AGC] {2,5} [^KRH] no no
Restriction of position of total pattern Pattern begins at sequence start ^ KKK no no
  Pattern ends at sequence end KKK $ no no