DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
Regular Expressions
«Prev
Unix Concepts
File Management
File Management Conclusion
Unix Customization
Creating Aliases Unix
list current Aliases
Displaying Previous Commands
Repeating Previous Commands
Modifying Previous Command
Changing System Prompt
Storing shell Settings
Sample cshrc File
Customize-environment
Grep Regular Expression
Define Regex
Using Quotes with Regex
Matching Pattern Occurrences
Matching Pattern Position
Turnoff Character Meaning
Regex Conclusion
Pattern Matching - Quiz
editing with vi
vi Review
Text in vi
Creating Text
Creating Command Shortcuts
Configure Editing Environment
Storing Custom Settings
Esditing Multiple Files
Pasting Text Files
vi Editing Conclusion
Managing Disk Space
Handling special cases in Regular Expressions
1) Using the cat command to display the sample file named text
2) The C shell interprets an ! as the command history character, even within quotes. This command uses bad syntax and produces an "Event not found" error.
3) To correct the previous command, use \! instead. Now the search succeeds.
4) This command is meant to search for the title Mr., but it actually finds Mr. followed by any character. The period (.) operates as a regular expression inside the quotes, and two lines match.
5) To search for a literal period, use \. . In the regular expression. Now the search finds just one matching line.
6) If a regular expression contains a single quote such as the word isn't
surround the expression with double quotes.
7) If you single-quote a regular expression that already contains a single quote, a syntax error occurs.
8) If a regular expression contains a double quote, as in the pattern "Hello" , surround the expression with single quotes. Because the is treated as a literal character, a matching is not needed. However, you need a matching pair of single quotes because they are used to enclose the argument
Ad
Mastering Regular Expressions