![]() 32.6. Regular Expressions: Matching a Character with a Character Set The simplest character set is a single
character. The regular expression the contains
three character sets: t, h, and
e. It will match any line that contains the string
the, including the word other.
To prevent this, put spaces ( You can combine the
string with an anchor. The pattern
^From: $USER Section 35.5 % grep '^From: ' $MAIL Some characters have a special meaning in regular expressions. If you want to search for such a character as itself, escape it with a backslash (\). -- BB ![]() Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|