...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Exactly one of the following must always be set for POSIX basic regular expressions:
Element |
Standardized |
Effect When Set |
---|---|---|
basic |
Yes |
Specifies that the grammar recognized by the regular expression engine is the same as that used by POSIX basic regular expressions in IEEE Std 1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions and Headers, Section 9, Regular Expressions (FWD.1). |
sed |
No |
As Above. |
grep |
Yes |
Specifies that the grammar recognized by the regular expression
engine is the same as that used by POSIX utility That is to say, the same as POSIX basic syntax, but with the newline character acting as an alternation character; the expression is treated as a newline separated list of alternatives. |
emacs |
No |
Specifies that the grammar recognised is the superset of the POSIX-Basic syntax used by the emacs program. |
The following options may also be set when using POSIX basic regular expressions:
Element |
Standardized |
Effect when set |
---|---|---|
icase |
Yes |
Specifies that matching of regular expressions against a character container sequence shall be performed without regard to case. |
nosubs |
Yes |
Specifies that when a regular expression is matched against a
character container sequence, then no sub-expression matches
are to be stored in the supplied |
optimize |
Yes |
Specifies that the regular expression engine should pay more attention to the speed with which regular expressions are matched, and less to the speed with which regular expression objects are constructed. Otherwise it has no detectable effect on the program output. This currently has no effect for Boost.Regex. |
collate |
Yes |
Specifies that character ranges of the form |
newline_alt |
No |
Specifies that the \n character has the same effect as the alternation
operator |. Allows newline separated lists to be used as a list
of alternatives. This bit is already set, if you use the |
no_char_classes |
No |
When set then character classes such as |
no_escape_in_lists |
No |
When set this makes the escape character ordinary inside lists,
so that |
no_intervals |
No |
When set then bounded repeats such as a{2,3} are not permitted. |
bk_plus_qm |
No |
When set then |
bk_vbar |
No |
When set then |
no_except |
No |
Prevents |
save_subexpression_location |
No |
When set then the locations of individual sub-expressions within
the original regular expression string can
be accessed via the |