123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497 |
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
- <title>match_flag_type</title>
- <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
- <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
- <link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
- <link rel="up" href="../ref.html" title="Reference">
- <link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title="Options for Literal Strings">
- <link rel="next" href="error_type.html" title="error_type">
- </head>
- <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
- <table cellpadding="2" width="100%"><tr>
- <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
- <td align="center"><a href="../../../../../../index.html">Home</a></td>
- <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
- <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
- <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
- <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
- </tr></table>
- <hr>
- <div class="spirit-nav">
- <a accesskey="p" href="syntax_option_type/syntax_option_type_literal.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="error_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
- </div>
- <div class="section">
- <div class="titlepage"><div><div><h3 class="title">
- <a name="boost_regex.ref.match_flag_type"></a><a class="link" href="match_flag_type.html" title="match_flag_type">match_flag_type</a>
- </h3></div></div></div>
- <p>
- The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
- is an implementation specific bitmask type (see C++ std 17.3.2.1.2) that
- controls how a regular expression is matched against a character sequence.
- The behavior of the format flags is described in more detail in the <a class="link" href="../format.html" title="Search and Replace Format String Syntax">format syntax guide</a>.
- </p>
- <pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">regex_constants</span><span class="special">{</span>
- <span class="keyword">typedef</span> <span class="identifier">implemenation</span><span class="special">-</span><span class="identifier">specific</span><span class="special">-</span><span class="identifier">bitmask</span><span class="special">-</span><span class="identifier">type</span> <span class="identifier">match_flag_type</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_default</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_bob</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_eob</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_bol</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_eol</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_bow</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_eow</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_any</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_null</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_continuous</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_partial</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_single_line</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_prev_avail</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_dot_newline</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_not_dot_null</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_posix</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_perl</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_nosubs</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">match_extra</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_default</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_sed</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_perl</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_literal</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_no_copy</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_first_only</span><span class="special">;</span>
- <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">match_flag_type</span> <span class="identifier">format_all</span><span class="special">;</span>
- <span class="special">}</span> <span class="comment">// namespace regex_constants</span>
- <span class="special">}</span> <span class="comment">// namespace boost</span>
- </pre>
- <h5>
- <a name="boost_regex.ref.match_flag_type.h0"></a>
- <span class="phrase"><a name="boost_regex.ref.match_flag_type.description"></a></span><a class="link" href="match_flag_type.html#boost_regex.ref.match_flag_type.description">Description</a>
- </h5>
- <p>
- The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
- is an implementation specific bitmask type (see C++ std 17.3.2.1.2). When
- matching a regular expression against a sequence of characters [first, last)
- then setting its elements has the effects listed in the table below:
- </p>
- <div class="informaltable"><table class="table">
- <colgroup>
- <col>
- <col>
- </colgroup>
- <thead><tr>
- <th>
- <p>
- Element
- </p>
- </th>
- <th>
- <p>
- Effect if set
- </p>
- </th>
- </tr></thead>
- <tbody>
- <tr>
- <td>
- <p>
- match_default
- </p>
- </td>
- <td>
- <p>
- Specifies that matching of regular expressions proceeds without
- any modification of the normal rules used in ECMA-262, ECMAScript
- Language Specification, Chapter 15 part 10, RegExp (Regular Expression)
- Objects (FWD.1)
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_bob
- </p>
- </td>
- <td>
- <p>
- Specifies that the expressions "\A" and "\`"
- should not match against the sub-sequence [first,first).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_eob
- </p>
- </td>
- <td>
- <p>
- Specifies that the expressions "\'", "\z" and
- "\Z" should not match against the sub-sequence [last,last).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_bol
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression "^" should not be matched
- against the sub-sequence [first,first).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_eol
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression "$" should not be matched
- against the sub-sequence [last,last).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_bow
- </p>
- </td>
- <td>
- <p>
- Specifies that the expressions "\<" and "\b"
- should not be matched against the sub-sequence [first,first).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_eow
- </p>
- </td>
- <td>
- <p>
- Specifies that the expressions "\>" and "\b"
- should not be matched against the sub-sequence [last,last).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_any
- </p>
- </td>
- <td>
- <p>
- Specifies that if more than one match is possible then any match
- is an acceptable result: this will still find the leftmost match,
- but may not find the "best" match at that position. Use
- this flag if you care about the speed of matching, but don't care
- what was matched (only whether there is one or not).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_null
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression can not be matched against an empty
- sequence.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_continuous
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression must match a sub-sequence that begins
- at first.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_partial
- </p>
- </td>
- <td>
- <p>
- Specifies that if no match can be found, then it is acceptable
- to return a match [from, last) such that from!= last, if there
- could exist some longer sequence of characters [from,to) of which
- [from,last) is a prefix, and which would result in a full match.
- This flag is used when matching incomplete or very long texts,
- see the partial matches documentation for more information.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_extra
- </p>
- </td>
- <td>
- <p>
- Instructs the matching engine to retain all available capture information;
- if a capturing group is repeated then information about every repeat
- is available via match_results::captures() or sub_match_captures().
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_single_line
- </p>
- </td>
- <td>
- <p>
- Equivalent to the inverse of Perl's m/ modifier; prevents ^ from
- matching after an embedded newline character (so that it only matches
- at the start of the text being matched), and $ from matching before
- an embedded newline (so that it only matches at the end of the
- text being matched).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_prev_avail
- </p>
- </td>
- <td>
- <p>
- Specifies that --first is a valid iterator position, when this
- flag is set then the flags match_not_bol and match_not_bow are
- ignored by the regular expression algorithms (RE.7) and iterators
- (RE.8).
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_dot_newline
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression "." does not match a newline
- character. This is the inverse of Perl's s/ modifier.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_not_dot_null
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression "." does not match a character
- null '\0'.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_posix
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression should be matched according to the
- POSIX <a class="link" href="../syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
- rule</a>, regardless of what kind of expression was compiled.
- Be warned that these rules do not work well with many Perl-specific
- features such as non-greedy repeats.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_perl
- </p>
- </td>
- <td>
- <p>
- Specifies that the expression should be matched according to the
- <a class="link" href="../syntax/perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">Perl
- matching rules</a>, irrespective of what kind of expression
- was compiled.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- match_nosubs
- </p>
- </td>
- <td>
- <p>
- Makes the expression behave as if it had no marked subexpressions,
- no matter how many capturing groups are actually present. The
- <a class="link" href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
- class will only contain information about the overall match, and
- not any sub-expressions.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- format_default
- </p>
- </td>
- <td>
- <p>
- Specifies that when a regular expression match is to be replaced
- by a new string, that the new string is constructed using the rules
- used by the ECMAScript replace function in ECMA-262, ECMAScript
- Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.
- (FWD.1).
- </p>
- <p>
- This is functionally identical to the <a class="link" href="../format/perl_format.html" title="Perl Format String Syntax">Perl
- format string rules</a>.
- </p>
- <p>
- In addition during search and replace operations then all non-overlapping
- occurrences of the regular expression are located and replaced,
- and sections of the input that did not match the expression, are
- copied unchanged to the output string.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- format_sed
- </p>
- </td>
- <td>
- <p>
- Specifies that when a regular expression match is to be replaced
- by a new string, that the new string is constructed using the rules
- used by the Unix sed utility in IEEE Std 1003.1-2001, Portable
- Operating SystemInterface (POSIX ), Shells and Utilities. See also
- the <a class="link" href="../format/sed_format.html" title="Sed Format String Syntax">Sed Format string
- reference</a>.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- format_perl
- </p>
- </td>
- <td>
- <p>
- Specifies that when a regular expression match is to be replaced
- by a new string, that the new string is constructed using <a class="link" href="../format/perl_format.html" title="Perl Format String Syntax">the same rules as Perl
- 5</a>.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- format_literal
- </p>
- </td>
- <td>
- <p>
- Specifies that when a regular expression match is to be replaced
- by a new string, that the new string is a literal copy of the replacement
- text.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- format_all
- </p>
- </td>
- <td>
- <p>
- Specifies that all syntax extensions are enabled, including conditional
- (?ddexpression1:expression2) replacements: see the <a class="link" href="../format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">format
- string guide</a> for more details.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- format_no_copy
- </p>
- </td>
- <td>
- <p>
- When specified during a search and replace operation, then sections
- of the character container sequence being searched that do match
- the regular expression, are not copied to the output string.
- </p>
- </td>
- </tr>
- <tr>
- <td>
- <p>
- format_first_only
- </p>
- </td>
- <td>
- <p>
- When specified during a search and replace operation, then only
- the first occurrence of the regular expression is replaced.
- </p>
- </td>
- </tr>
- </tbody>
- </table></div>
- </div>
- <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
- <td align="left"></td>
- <td align="right"><div class="copyright-footer">Copyright © 1998-2013 John Maddock<p>
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
- </p>
- </div></td>
- </tr></table>
- <hr>
- <div class="spirit-nav">
- <a accesskey="p" href="syntax_option_type/syntax_option_type_literal.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="error_type.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
- </div>
- </body>
- </html>
|