O'Reilly logo

Linux Shells by Example by Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

2.2. Combining Regular Expression Metacharacters

Now that the basic regular expression metacharacters have been explained, they can be combined into more complex expressions. Each of the regular expression examples enclosed in forward slashes is the search string and is matched against each line in the text file.

Example 2.9.
					Note: The line numbers are NOT part of the text file. The vertical
bars mark the left and right margins.
   ------------------------------------------------------------------
1  |Christian Scott lives here and will put on a Christmas party.|
2  |There are around 30 to 35 people invited.|
3  |They are: |
4  |                               Tom|
5  |Dan|
6  |   Rhonda Savage|
7  |Nicky and Kimberly.|
8  |Steve, Suzanne, Ginger and Larry.|
   ------------------------------------------------------------------ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required