Mercurial > repos > bgruening > text_processing
diff awk.xml @ 7:d64eace4f9f3 draft
Uploaded
author | bgruening |
---|---|
date | Sat, 17 Jan 2015 08:30:15 -0500 |
parents | 8928e6d1e7ba |
children | 062ed2bb4f2e |
line wrap: on
line diff
--- a/awk.xml Thu Jan 08 09:07:31 2015 -0500 +++ b/awk.xml Sat Jan 17 08:30:15 2015 -0500 @@ -51,9 +51,9 @@ .. class:: infomark -**TIP:** +**TIP:** -This tool uses the **extended regular** expression syntax (not the perl syntax). +This tool uses the **extended regular** expression syntax (not the perl syntax). **\\d**, **\\w**, **\\s** etc. are **not** supported. @@ -96,7 +96,7 @@ **AWK's Regular Expression Syntax** -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. +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. - **( ) { } [ ] . * ? + \ ^ $** are all special characters. **\\** can be used to "escape" a special character, allowing that special character to be searched for. - **^** matches the beginning of a string(but not an internal line). @@ -104,8 +104,8 @@ - **{** n or n, or n,m **}** specifies an expected number of repetitions of the preceding pattern. - **{n}** The preceding item is matched exactly n times. - - **{n,}** The preceding item ismatched n or more times. - - **{n,m}** The preceding item is matched at least n times but not more than m times. + - **{n,}** The preceding item ismatched n or more times. + - **{n,m}** The preceding item is matched at least n times but not more than m times. - **[** ... **]** 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**. - **.** Matches any single character except a newline. @@ -113,10 +113,10 @@ - **?** The preceding item is optional and matched at most once. - **+** The preceding item will be matched one or more times. - **^** has two meaning: - - matches the beginning of a line or string. + - matches the beginning of a line or string. - indicates negation in a character class. For example, [^...] matches every character except the ones inside brackets. - **$** matches the end of a line or string. -- **\|** Separates alternate possibilities. +- **\|** Separates alternate possibilities. @REFERENCES@ ]]>