]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/regex/doc/html/boost_regex/ref/match_flag_type.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / regex / doc / html / boost_regex / ref / match_flag_type.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>match_flag_type</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7 <link rel="home" href="../../index.html" title="Boost.Regex 5.1.2">
8 <link rel="up" href="../ref.html" title="Reference">
9 <link rel="prev" href="syntax_option_type/syntax_option_type_literal.html" title="Options for Literal Strings">
10 <link rel="next" href="error_type.html" title="error_type">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <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>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h3 class="title">
27 <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>
28 </h3></div></div></div>
29 <p>
30 The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
31 is an implementation specific bitmask type (see C++ std 17.3.2.1.2) that
32 controls how a regular expression is matched against a character sequence.
33 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>.
34 </p>
35 <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>
36
37 <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>
38
39 <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>
40 <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>
41 <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>
42 <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>
43 <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>
44 <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>
45 <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>
46 <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>
47 <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>
48 <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>
49 <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>
50 <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>
51 <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>
52 <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>
53 <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>
54 <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>
55 <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>
56 <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>
57 <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>
58
59 <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>
60 <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>
61 <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>
62 <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>
63
64 <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>
65 <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>
66 <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>
67
68 <span class="special">}</span> <span class="comment">// namespace regex_constants</span>
69 <span class="special">}</span> <span class="comment">// namespace boost</span>
70 </pre>
71 <h5>
72 <a name="boost_regex.ref.match_flag_type.h0"></a>
73 <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>
74 </h5>
75 <p>
76 The type <code class="computeroutput"><span class="identifier">match_flag_type</span></code>
77 is an implementation specific bitmask type (see C++ std 17.3.2.1.2). When
78 matching a regular expression against a sequence of characters [first, last)
79 then setting its elements has the effects listed in the table below:
80 </p>
81 <div class="informaltable"><table class="table">
82 <colgroup>
83 <col>
84 <col>
85 </colgroup>
86 <thead><tr>
87 <th>
88 <p>
89 Element
90 </p>
91 </th>
92 <th>
93 <p>
94 Effect if set
95 </p>
96 </th>
97 </tr></thead>
98 <tbody>
99 <tr>
100 <td>
101 <p>
102 match_default
103 </p>
104 </td>
105 <td>
106 <p>
107 Specifies that matching of regular expressions proceeds without
108 any modification of the normal rules used in ECMA-262, ECMAScript
109 Language Specification, Chapter 15 part 10, RegExp (Regular Expression)
110 Objects (FWD.1)
111 </p>
112 </td>
113 </tr>
114 <tr>
115 <td>
116 <p>
117 match_not_bob
118 </p>
119 </td>
120 <td>
121 <p>
122 Specifies that the expressions "\A" and "\`"
123 should not match against the sub-sequence [first,first).
124 </p>
125 </td>
126 </tr>
127 <tr>
128 <td>
129 <p>
130 match_not_eob
131 </p>
132 </td>
133 <td>
134 <p>
135 Specifies that the expressions "\'", "\z" and
136 "\Z" should not match against the sub-sequence [last,last).
137 </p>
138 </td>
139 </tr>
140 <tr>
141 <td>
142 <p>
143 match_not_bol
144 </p>
145 </td>
146 <td>
147 <p>
148 Specifies that the expression "^" should not be matched
149 against the sub-sequence [first,first).
150 </p>
151 </td>
152 </tr>
153 <tr>
154 <td>
155 <p>
156 match_not_eol
157 </p>
158 </td>
159 <td>
160 <p>
161 Specifies that the expression "$" should not be matched
162 against the sub-sequence [last,last).
163 </p>
164 </td>
165 </tr>
166 <tr>
167 <td>
168 <p>
169 match_not_bow
170 </p>
171 </td>
172 <td>
173 <p>
174 Specifies that the expressions "\&lt;" and "\b"
175 should not be matched against the sub-sequence [first,first).
176 </p>
177 </td>
178 </tr>
179 <tr>
180 <td>
181 <p>
182 match_not_eow
183 </p>
184 </td>
185 <td>
186 <p>
187 Specifies that the expressions "\&gt;" and "\b"
188 should not be matched against the sub-sequence [last,last).
189 </p>
190 </td>
191 </tr>
192 <tr>
193 <td>
194 <p>
195 match_any
196 </p>
197 </td>
198 <td>
199 <p>
200 Specifies that if more than one match is possible then any match
201 is an acceptable result: this will still find the leftmost match,
202 but may not find the "best" match at that position. Use
203 this flag if you care about the speed of matching, but don't care
204 what was matched (only whether there is one or not).
205 </p>
206 </td>
207 </tr>
208 <tr>
209 <td>
210 <p>
211 match_not_null
212 </p>
213 </td>
214 <td>
215 <p>
216 Specifies that the expression can not be matched against an empty
217 sequence.
218 </p>
219 </td>
220 </tr>
221 <tr>
222 <td>
223 <p>
224 match_continuous
225 </p>
226 </td>
227 <td>
228 <p>
229 Specifies that the expression must match a sub-sequence that begins
230 at first.
231 </p>
232 </td>
233 </tr>
234 <tr>
235 <td>
236 <p>
237 match_partial
238 </p>
239 </td>
240 <td>
241 <p>
242 Specifies that if no match can be found, then it is acceptable
243 to return a match [from, last) such that from!= last, if there
244 could exist some longer sequence of characters [from,to) of which
245 [from,last) is a prefix, and which would result in a full match.
246 This flag is used when matching incomplete or very long texts,
247 see the partial matches documentation for more information.
248 </p>
249 </td>
250 </tr>
251 <tr>
252 <td>
253 <p>
254 match_extra
255 </p>
256 </td>
257 <td>
258 <p>
259 Instructs the matching engine to retain all available capture information;
260 if a capturing group is repeated then information about every repeat
261 is available via match_results::captures() or sub_match_captures().
262 </p>
263 </td>
264 </tr>
265 <tr>
266 <td>
267 <p>
268 match_single_line
269 </p>
270 </td>
271 <td>
272 <p>
273 Equivalent to the inverse of Perl's m/ modifier; prevents ^ from
274 matching after an embedded newline character (so that it only matches
275 at the start of the text being matched), and $ from matching before
276 an embedded newline (so that it only matches at the end of the
277 text being matched).
278 </p>
279 </td>
280 </tr>
281 <tr>
282 <td>
283 <p>
284 match_prev_avail
285 </p>
286 </td>
287 <td>
288 <p>
289 Specifies that --first is a valid iterator position, when this
290 flag is set then the flags match_not_bol and match_not_bow are
291 ignored by the regular expression algorithms (RE.7) and iterators
292 (RE.8).
293 </p>
294 </td>
295 </tr>
296 <tr>
297 <td>
298 <p>
299 match_not_dot_newline
300 </p>
301 </td>
302 <td>
303 <p>
304 Specifies that the expression "." does not match a newline
305 character. This is the inverse of Perl's s/ modifier.
306 </p>
307 </td>
308 </tr>
309 <tr>
310 <td>
311 <p>
312 match_not_dot_null
313 </p>
314 </td>
315 <td>
316 <p>
317 Specifies that the expression "." does not match a character
318 null '\0'.
319 </p>
320 </td>
321 </tr>
322 <tr>
323 <td>
324 <p>
325 match_posix
326 </p>
327 </td>
328 <td>
329 <p>
330 Specifies that the expression should be matched according to the
331 POSIX <a class="link" href="../syntax/leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
332 rule</a>, regardless of what kind of expression was compiled.
333 Be warned that these rules do not work well with many Perl-specific
334 features such as non-greedy repeats.
335 </p>
336 </td>
337 </tr>
338 <tr>
339 <td>
340 <p>
341 match_perl
342 </p>
343 </td>
344 <td>
345 <p>
346 Specifies that the expression should be matched according to the
347 <a class="link" href="../syntax/perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">Perl
348 matching rules</a>, irrespective of what kind of expression
349 was compiled.
350 </p>
351 </td>
352 </tr>
353 <tr>
354 <td>
355 <p>
356 match_nosubs
357 </p>
358 </td>
359 <td>
360 <p>
361 Makes the expression behave as if it had no marked subexpressions,
362 no matter how many capturing groups are actually present. The
363 <a class="link" href="match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a>
364 class will only contain information about the overall match, and
365 not any sub-expressions.
366 </p>
367 </td>
368 </tr>
369 <tr>
370 <td>
371 <p>
372 format_default
373 </p>
374 </td>
375 <td>
376 <p>
377 Specifies that when a regular expression match is to be replaced
378 by a new string, that the new string is constructed using the rules
379 used by the ECMAScript replace function in ECMA-262, ECMAScript
380 Language Specification, Chapter 15 part 5.4.11 String.prototype.replace.
381 (FWD.1).
382 </p>
383 <p>
384 This is functionally identical to the <a class="link" href="../format/perl_format.html" title="Perl Format String Syntax">Perl
385 format string rules</a>.
386 </p>
387 <p>
388 In addition during search and replace operations then all non-overlapping
389 occurrences of the regular expression are located and replaced,
390 and sections of the input that did not match the expression, are
391 copied unchanged to the output string.
392 </p>
393 </td>
394 </tr>
395 <tr>
396 <td>
397 <p>
398 format_sed
399 </p>
400 </td>
401 <td>
402 <p>
403 Specifies that when a regular expression match is to be replaced
404 by a new string, that the new string is constructed using the rules
405 used by the Unix sed utility in IEEE Std 1003.1-2001, Portable
406 Operating SystemInterface (POSIX ), Shells and Utilities. See also
407 the <a class="link" href="../format/sed_format.html" title="Sed Format String Syntax">Sed Format string
408 reference</a>.
409 </p>
410 </td>
411 </tr>
412 <tr>
413 <td>
414 <p>
415 format_perl
416 </p>
417 </td>
418 <td>
419 <p>
420 Specifies that when a regular expression match is to be replaced
421 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
422 5</a>.
423 </p>
424 </td>
425 </tr>
426 <tr>
427 <td>
428 <p>
429 format_literal
430 </p>
431 </td>
432 <td>
433 <p>
434 Specifies that when a regular expression match is to be replaced
435 by a new string, that the new string is a literal copy of the replacement
436 text.
437 </p>
438 </td>
439 </tr>
440 <tr>
441 <td>
442 <p>
443 format_all
444 </p>
445 </td>
446 <td>
447 <p>
448 Specifies that all syntax extensions are enabled, including conditional
449 (?ddexpression1:expression2) replacements: see the <a class="link" href="../format/boost_format_syntax.html" title="Boost-Extended Format String Syntax">format
450 string guide</a> for more details.
451 </p>
452 </td>
453 </tr>
454 <tr>
455 <td>
456 <p>
457 format_no_copy
458 </p>
459 </td>
460 <td>
461 <p>
462 When specified during a search and replace operation, then sections
463 of the character container sequence being searched that do match
464 the regular expression, are not copied to the output string.
465 </p>
466 </td>
467 </tr>
468 <tr>
469 <td>
470 <p>
471 format_first_only
472 </p>
473 </td>
474 <td>
475 <p>
476 When specified during a search and replace operation, then only
477 the first occurrence of the regular expression is replaced.
478 </p>
479 </td>
480 </tr>
481 </tbody>
482 </table></div>
483 </div>
484 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
485 <td align="left"></td>
486 <td align="right"><div class="copyright-footer">Copyright &#169; 1998-2013 John Maddock<p>
487 Distributed under the Boost Software License, Version 1.0. (See accompanying
488 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>)
489 </p>
490 </div></td>
491 </tr></table>
492 <hr>
493 <div class="spirit-nav">
494 <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>
495 </div>
496 </body>
497 </html>