Appendix C:Regular Expression Format
106
Equalizer Installation and Administration Guide
A bracket expression is a list of characters enclosed in brackets ( [...] ). It normally matches
any single character from the list. If the list begins with ^, it matches any single character
not from the rest of the list. If two characters in the list are separated by `-' this is shorthand
for the full range of characters between those two (inclusive) in the collating sequence, e.g.
`[0-9]' in ASCII matches any decimal digit. It is illegal for two ranges to share an endpoint,
e.g. `a-c-e'. Ranges are very collating-sequence-dependent, and portable programs should
avoid relying on them.
To include a literal `]' in the list, make it the first character (following a possible `^'). To
include a literal `-', make it the first or last character, or the second endpoint of a range. To
use a literal `-' as the first endpoint of a range, enclose it in `[.' and `.]' to make it a collating
element (see below). With the exception of these and some combinations using `[' (see next
paragraphs), all other special characters, including `\', lose their special significance within
a bracket expression.
Within a bracket expression, a collating element (a character, a multi-character sequence
that collates as if it were a single character, or a collating-sequence name for either)
enclosed in `[.' and `.]' stands for the sequence of characters of that collating element. The
sequence is a single element of the bracket expression's list. A bracket expression
containing a multi-character collating element can thus match more than one character, e.g.
if the collating sequence includes a `ch' collating element, then the RE `[[.ch.]]*c' matches
the first five characters of `chchcc'.
Within a bracket expression, a collating element enclosed in `[' and `]' is an equivalence
class, standing for the sequences of characters of all collating elements equivalent to that
one, including itself. (If there are no other equivalent collating elements, the treatment is as
if the enclosing delimiters were `[.' and `.]'.) For example, if `x' and `y' are the members of
an equivalence class, then `[[x]]', `[[y]]', and `[xy]' are all synonymous. An equivalence
class may not be an end-point of a range.
Within a bracket expression, the name of a character class enclosed in `[:' and `:]' stands for
the list of all characters belonging to that class.
There are two special cases of bracket expressions: the bracket expressions `[[:<:]]' and
`[[:>:]]' match the null string at the beginning and end of a word respectively. A word is
defined as a sequence of word characters which is neither preceded nor followed by word
characters. A word character is an alnum character (as defined by ctype(3)) or an
underscore. This is an extension, compatible with but not specified by IEEE Std 1003.2
(``POSIX.2''), and should be used with caution in software intended to be portable to other
systems.
In the event that an RE could match more than one substring of a given string, the RE
matches the one starting earliest in the string. If the RE could match more than one
substring starting at that point, it matches the longest. Subexpressions also match the
longest possible substrings, subject to the constraint that the whole match be as long as
possible, with subexpressions starting earlier in the RE taking priority over ones starting
later. Note that higher-level subexpressions thus take priority over their lower-level
component subexpressions.
Содержание Equalizer
Страница 2: ......
Страница 4: ...iv Coyote Point Systems Inc ...
Страница 32: ...Chapter 2 Installing Equalizer 22 Equalizer Installation and Administration Guide ...
Страница 42: ...Chapter 3 Configuring Equalizer 32 Equalizer Installation and Administration Guide ...
Страница 70: ...Chapter 4 Administering Equalizer Operation 60 Equalizer Installation and Administration Guide ...
Страница 104: ...Chapter 6 Administering Geographic Clusters 94 Equalizer Installation and Administration Guide ...
Страница 108: ...Chapter 7 Troubleshooting 98 Equalizer Installation and Administration Guide ...
Страница 114: ...Appendix B Using Reserved IP Addresses 104 Equalizer Installation and Administration Guide ...
Страница 118: ...Appendix C Regular Expression Format 108 Equalizer Installation and Administration Guide ...
Страница 130: ...Appendix E Technical Specifications 120 Equalizer Installation and Administration Guide ...
Страница 136: ...Appendix F License and Warranty 126 Equalizer Installation and Administration Guide ...