comparison grep.xml @ 7:d64eace4f9f3 draft

Uploaded
author bgruening
date Sat, 17 Jan 2015 08:30:15 -0500
parents 8928e6d1e7ba
children fa7f88da29d7
comparison
equal deleted inserted replaced
6:8928e6d1e7ba 7:d64eace4f9f3
122 - **C{2,5}AGC** would match lines with 2 to 5 consecutive Cs followed by AGC 122 - **C{2,5}AGC** would match lines with 2 to 5 consecutive Cs followed by AGC
123 - **TTT.{4,10}AAA** would match lines with 3 Ts, followed by 4 to 10 characters (any characeters), followed by 3 As. 123 - **TTT.{4,10}AAA** would match lines with 3 Ts, followed by 4 to 10 characters (any characeters), followed by 3 As.
124 - **^chr([0-9A-Za-z])+** would match lines that begin with chromsomes, such as lines in a BED format file. 124 - **^chr([0-9A-Za-z])+** would match lines that begin with chromsomes, such as lines in a BED format file.
125 - **(ACGT){1,5}** would match at least 1 "ACGT" and at most 5 "ACGT" consecutively. 125 - **(ACGT){1,5}** would match at least 1 "ACGT" and at most 5 "ACGT" consecutively.
126 - **hsa|mmu** would match lines containing "hsa" or "mmu" (or both). 126 - **hsa|mmu** would match lines containing "hsa" or "mmu" (or both).
127 127
128 ----- 128 -----
129 129
130 **Regular Expression Syntax** 130 **Regular Expression Syntax**
131 131
132 The select tool searches the data for lines containing or not containing a match to the given pattern. A Regular Expression is a pattern descibing a certain amount of text. 132 The select tool searches the data for lines containing or not containing a match to the given pattern. A Regular Expression is a pattern descibing a certain amount of text.
133 133
134 - **( ) { } [ ] . * ? + \ ^ $** are all special characters. **\\** can be used to "escape" a special character, allowing that special character to be searched for. 134 - **( ) { } [ ] . * ? + \ ^ $** are all special characters. **\\** can be used to "escape" a special character, allowing that special character to be searched for.
135 - **^** matches the beginning of a string(but not an internal line). 135 - **^** matches the beginning of a string(but not an internal line).
136 - **\\d** matches a digit, same as [0-9]. 136 - **\\d** matches a digit, same as [0-9].
137 - **\\D** matches a non-digit. 137 - **\\D** matches a non-digit.
143 - **(** .. **)** groups a particular pattern. 143 - **(** .. **)** groups a particular pattern.
144 - **\\Z** matches the end of a string(but not a internal line). 144 - **\\Z** matches the end of a string(but not a internal line).
145 - **{** n or n, or n,m **}** specifies an expected number of repetitions of the preceding pattern. 145 - **{** n or n, or n,m **}** specifies an expected number of repetitions of the preceding pattern.
146 146
147 - **{n}** The preceding item is matched exactly n times. 147 - **{n}** The preceding item is matched exactly n times.
148 - **{n,}** The preceding item ismatched n or more times. 148 - **{n,}** The preceding item ismatched n or more times.
149 - **{n,m}** The preceding item is matched at least n times but not more than m times. 149 - **{n,m}** The preceding item is matched at least n times but not more than m times.
150 150
151 - **[** ... **]** creates a character class. Within the brackets, single characters can be placed. A dash (-) may be used to indicate a range such as **a-z**. 151 - **[** ... **]** creates a character class. Within the brackets, single characters can be placed. A dash (-) may be used to indicate a range such as **a-z**.
152 - **.** Matches any single character except a newline. 152 - **.** Matches any single character except a newline.
153 - ***** The preceding item will be matched zero or more times. 153 - ***** The preceding item will be matched zero or more times.
154 - **?** The preceding item is optional and matched at most once. 154 - **?** The preceding item is optional and matched at most once.
155 - **+** The preceding item will be matched one or more times. 155 - **+** The preceding item will be matched one or more times.
156 - **^** has two meaning: 156 - **^** has two meaning:
157 - matches the beginning of a line or string. 157 - matches the beginning of a line or string.
158 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets. 158 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets.
159 - **$** matches the end of a line or string. 159 - **$** matches the end of a line or string.
160 - **\|** Separates alternate possibilities. 160 - **\|** Separates alternate possibilities.
161 161
162 @REFERENCES@ 162 @REFERENCES@
163 ]]> 163 ]]>
164 </help> 164 </help>
165 </tool> 165 </tool>