![]() 32.19. I Never Meta Character I Didn't LikeOnce you know regular expression syntax, you can match almost
anything. But sometimes, it's a pain to think
through how to get what you want. Table 32-4 lists
some useful regular expressions that match various kinds of data you
might have to deal with in the Unix environment. Some of these
examples work in any program that uses regular expressions; others
only work with a specific program such as egrep.
(Section 32.20 lists the metacharacters that
each program accepts.) The Note that these regular expressions are only examples. They aren't meant to match (for instance) every occurrence of a city and state in any arbitrary text. But if you can picture what the expression does and why, that should help you write an expression that fits your text. Table 32-4. Some useful regular expressions
--DD and JP ![]() Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|