Distributed Networks Distributed Networks

Unix Concepts   «Prev  Next»
Lesson 7
Regular Expressions Conclusion
This module discussed regular expressions, particularly when used with grep. You learned what regular expressions are as well as some of the metacharacters that make up regular expression syntax. Using these metacharacters, you learned how to search for patterns based on their occurrence or position.
Because regular expressions usually contain characters that have special meaning to the shell, regular expressions must be quoted correctly. You learned how to use single quotes, double quotes, and the backslash characters to ensure correct syntax.
Key commands
This module introduced the following key UNIX characters:
  1. Dot (.)
  2. Asterisk (*)
  3. Brackets ([ ])
  4. Caret (^)
  5. Dollar sign ($)
  6. Double quote (")
  7. Single quote (')
  8. Backslash (\)

This module introduced you to the following terms and concepts:
  1. anchor: An anchor is a metacharacter such as ^ or $ that restricts a match to a particular position.
  2. metacharacter: A metacharacter is a character with special meaning in regular expressions and is not treated literally. Examples include the * and . metacharacters.
  3. pattern matching: Pattern matching is the task of using regular expressions to search for text.
  4. regular expression: A regular expression describes a pattern using literal characters and optional metacharacters known as regular expression syntax.
  5. shell variable: A shell variable is a place to store data that is used by the shell.
  6. string: A string is a sequence of characters.
  7. wildcards: Wildcards are characters that the shell interprets in a special way. Wildcards create patterns for matching filenames. Examples include ?, *, and [].
In the next module, you will learn to use the advanced features of the vi editor.

Regular Expression - Quiz
Click the Quiz link below to answer some questions about using grep with regular expressions.
Regular Expression - Quiz