Mercurial > repos > bgruening > text_processing
comparison awk.xml @ 7:d64eace4f9f3 draft
Uploaded
author | bgruening |
---|---|
date | Sat, 17 Jan 2015 08:30:15 -0500 |
parents | 8928e6d1e7ba |
children | 062ed2bb4f2e |
comparison
equal
deleted
inserted
replaced
6:8928e6d1e7ba | 7:d64eace4f9f3 |
---|---|
49 | 49 |
50 This tool runs the unix **awk** command on the selected data file. | 50 This tool runs the unix **awk** command on the selected data file. |
51 | 51 |
52 .. class:: infomark | 52 .. class:: infomark |
53 | 53 |
54 **TIP:** | 54 **TIP:** |
55 | 55 |
56 This tool uses the **extended regular** expression syntax (not the perl syntax). | 56 This tool uses the **extended regular** expression syntax (not the perl syntax). |
57 **\\d**, **\\w**, **\\s** etc. are **not** supported. | 57 **\\d**, **\\w**, **\\s** etc. are **not** supported. |
58 | 58 |
59 | 59 |
60 **Further reading** | 60 **Further reading** |
61 | 61 |
94 - If no action part is specified (not even the curly brackets) - the default action is to print the entire line. | 94 - If no action part is specified (not even the curly brackets) - the default action is to print the entire line. |
95 | 95 |
96 | 96 |
97 **AWK's Regular Expression Syntax** | 97 **AWK's Regular Expression Syntax** |
98 | 98 |
99 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. | 99 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. |
100 | 100 |
101 - **( ) { } [ ] . * ? + \ ^ $** are all special characters. **\\** can be used to "escape" a special character, allowing that special character to be searched for. | 101 - **( ) { } [ ] . * ? + \ ^ $** are all special characters. **\\** can be used to "escape" a special character, allowing that special character to be searched for. |
102 - **^** matches the beginning of a string(but not an internal line). | 102 - **^** matches the beginning of a string(but not an internal line). |
103 - **(** .. **)** groups a particular pattern. | 103 - **(** .. **)** groups a particular pattern. |
104 - **{** n or n, or n,m **}** specifies an expected number of repetitions of the preceding pattern. | 104 - **{** n or n, or n,m **}** specifies an expected number of repetitions of the preceding pattern. |
105 | 105 |
106 - **{n}** The preceding item is matched exactly n times. | 106 - **{n}** The preceding item is matched exactly n times. |
107 - **{n,}** The preceding item ismatched n or more times. | 107 - **{n,}** The preceding item ismatched n or more times. |
108 - **{n,m}** The preceding item is matched at least n times but not more than m times. | 108 - **{n,m}** The preceding item is matched at least n times but not more than m times. |
109 | 109 |
110 - **[** ... **]** 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**. | 110 - **[** ... **]** 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**. |
111 - **.** Matches any single character except a newline. | 111 - **.** Matches any single character except a newline. |
112 - ***** The preceding item will be matched zero or more times. | 112 - ***** The preceding item will be matched zero or more times. |
113 - **?** The preceding item is optional and matched at most once. | 113 - **?** The preceding item is optional and matched at most once. |
114 - **+** The preceding item will be matched one or more times. | 114 - **+** The preceding item will be matched one or more times. |
115 - **^** has two meaning: | 115 - **^** has two meaning: |
116 - matches the beginning of a line or string. | 116 - matches the beginning of a line or string. |
117 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets. | 117 - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets. |
118 - **$** matches the end of a line or string. | 118 - **$** matches the end of a line or string. |
119 - **\|** Separates alternate possibilities. | 119 - **\|** Separates alternate possibilities. |
120 | 120 |
121 @REFERENCES@ | 121 @REFERENCES@ |
122 ]]> | 122 ]]> |
123 </help> | 123 </help> |
124 </tool> | 124 </tool> |