1.1) grep: is a text Search tool. The so-called metacharacters is not meant literal meaning, meta-character expression control or wildcard functions
2) Fgep:fast, does not support regular expressions, when literal representation.
"Grep"
1. Basic regular expression meta-characters:
. : Matches a single character.
[]: matches any single character within the specified range.
such as [0-9] = = = [[:d igit:]], [a-z] = = = [[: Lower:]], [a-z] = = = [[: Upper:]], [^]: Reverse
[[: Space:]]: space, [[:p UNCT:]]: special characters, [[: Alpha:]]: Uppercase and lowercase [[: Alnum:]]: Letters or numbers
2. Number of times match metacharacters: Specifies the number of occurrences of the preceding character
①*: Any length, the characters in front of him can appear any time
②\? : A single character appears 0 or one time
③\{m\}: Exact match appears m times
④\{m,n\}: Appears at least m times, up to N times
3. Position anchoring
Beginning: ^ Line end: $ word Left: \< word right:\>
A string of words that do not contain the characters of a continuous character of special characters
4. Grouping \ (* * * \) Once grouped, the group is considered an atomic unit
\#: Refers to the content that the # # brackets match to, not the pattern itself
5. Command options
-V: the inverse selection
-O: Only matching strings are displayed, not the lines where the strings are located
-I: Ignore case
-e: extending regular expressions
-A: Displays the following line
-B: Display the line above
-C: Display context
In the extended regular expression are also:
+: match at least once
grep Regular Expression