User Tools

Site Tools


2018grep_motifs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2018grep_motifs [2018/09/10 11:31]
david [Variable length patterns]
2018grep_motifs [2018/09/10 11:37] (current)
david
Line 88: Line 88:
 output/​R13A5.5.1.fa:​24:​ttactaatttttgttatcttatcaaacaaatatattttccagc output/​R13A5.5.1.fa:​24:​ttactaatttttgttatcttatcaaacaaatatattttccagc
 </​code>​ </​code>​
 +
 +Here is the full set of repetition operators in regular expressions.
 +<code bash>
 +$ man grep
 +</​code>​
 +
 +...Scrolling way down...
 +
 +<​code>​
 +   ​Repetition
 +       A regular expression may be followed by one of several repetition operators:
 +       ? ​     The preceding item is optional and matched at most once.
 +       ​* ​     The preceding item will be matched zero or more times.
 +       ​+ ​     The preceding item will be matched one or more times.
 +       ​{n} ​   The preceding item is matched exactly n times.
 +       ​{n,​} ​  The preceding item is matched n or more times.
 +       ​{,​m} ​  The preceding item is matched at most m times. ​ This is a GNU extension.
 +       ​{n,​m} ​ The preceding item is matched at least n times, but not more than m times.
 +</​code>​
 +
 +Regular expressions are a general concept, but different commands may have different limitations on what they support.
 +There are more operators, patterns, and capabilities of regular expressions,​ but like most things we've encountered,​ YOU MUST TEST each command to make sure it works as expected.
2018grep_motifs.1536600692.txt.gz ยท Last modified: 2018/09/10 11:31 by david