]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> | |
4 | <title>Options for POSIX Basic Regular Expressions</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="../syntax_option_type.html" title="syntax_option_type"> | |
9 | <link rel="prev" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions"> | |
10 | <link rel="next" href="syntax_option_type_literal.html" title="Options for Literal Strings"> | |
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_extended.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.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="syntax_option_type_literal.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> | |
24 | </div> | |
25 | <div class="section"> | |
26 | <div class="titlepage"><div><div><h4 class="title"> | |
27 | <a name="boost_regex.ref.syntax_option_type.syntax_option_type_basic"></a><a class="link" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">Options | |
28 | for POSIX Basic Regular Expressions</a> | |
29 | </h4></div></div></div> | |
30 | <p> | |
31 | Exactly one of the following must always be set for POSIX basic regular | |
32 | expressions: | |
33 | </p> | |
34 | <div class="informaltable"><table class="table"> | |
35 | <colgroup> | |
36 | <col> | |
37 | <col> | |
38 | <col> | |
39 | </colgroup> | |
40 | <thead><tr> | |
41 | <th> | |
42 | <p> | |
43 | Element | |
44 | </p> | |
45 | </th> | |
46 | <th> | |
47 | <p> | |
48 | Standardized | |
49 | </p> | |
50 | </th> | |
51 | <th> | |
52 | <p> | |
53 | Effect When Set | |
54 | </p> | |
55 | </th> | |
56 | </tr></thead> | |
57 | <tbody> | |
58 | <tr> | |
59 | <td> | |
60 | <p> | |
61 | basic | |
62 | </p> | |
63 | </td> | |
64 | <td> | |
65 | <p> | |
66 | Yes | |
67 | </p> | |
68 | </td> | |
69 | <td> | |
70 | <p> | |
71 | Specifies that the grammar recognized by the regular expression | |
72 | engine is the same as that used by <a class="link" href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX | |
73 | basic regular expressions</a> in IEEE Std 1003.1-2001, Portable | |
74 | Operating System Interface (POSIX ), Base Definitions and Headers, | |
75 | Section 9, Regular Expressions (FWD.1). | |
76 | </p> | |
77 | </td> | |
78 | </tr> | |
79 | <tr> | |
80 | <td> | |
81 | <p> | |
82 | sed | |
83 | </p> | |
84 | </td> | |
85 | <td> | |
86 | <p> | |
87 | No | |
88 | </p> | |
89 | </td> | |
90 | <td> | |
91 | <p> | |
92 | As Above. | |
93 | </p> | |
94 | </td> | |
95 | </tr> | |
96 | <tr> | |
97 | <td> | |
98 | <p> | |
99 | grep | |
100 | </p> | |
101 | </td> | |
102 | <td> | |
103 | <p> | |
104 | Yes | |
105 | </p> | |
106 | </td> | |
107 | <td> | |
108 | <p> | |
109 | Specifies that the grammar recognized by the regular expression | |
110 | engine is the same as that used by POSIX utility <code class="computeroutput"><span class="identifier">grep</span></code> in IEEE Std 1003.1-2001, | |
111 | Portable Operating System Interface (POSIX ), Shells and Utilities, | |
112 | Section 4, Utilit\ies, grep (FWD.1). | |
113 | </p> | |
114 | <p> | |
115 | That is to say, the same as <a class="link" href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX | |
116 | basic syntax</a>, but with the newline character acting as | |
117 | an alternation character; the expression is treated as a newline | |
118 | separated list of alternatives. | |
119 | </p> | |
120 | </td> | |
121 | </tr> | |
122 | <tr> | |
123 | <td> | |
124 | <p> | |
125 | emacs | |
126 | </p> | |
127 | </td> | |
128 | <td> | |
129 | <p> | |
130 | No | |
131 | </p> | |
132 | </td> | |
133 | <td> | |
134 | <p> | |
135 | Specifies that the grammar recognised is the superset of the | |
136 | <a class="link" href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-Basic syntax</a> | |
137 | used by the emacs program. | |
138 | </p> | |
139 | </td> | |
140 | </tr> | |
141 | </tbody> | |
142 | </table></div> | |
143 | <p> | |
144 | The following options may also be set when using POSIX basic regular expressions: | |
145 | </p> | |
146 | <div class="informaltable"><table class="table"> | |
147 | <colgroup> | |
148 | <col> | |
149 | <col> | |
150 | <col> | |
151 | </colgroup> | |
152 | <thead><tr> | |
153 | <th> | |
154 | <p> | |
155 | Element | |
156 | </p> | |
157 | </th> | |
158 | <th> | |
159 | <p> | |
160 | Standardized | |
161 | </p> | |
162 | </th> | |
163 | <th> | |
164 | <p> | |
165 | Effect when set | |
166 | </p> | |
167 | </th> | |
168 | </tr></thead> | |
169 | <tbody> | |
170 | <tr> | |
171 | <td> | |
172 | <p> | |
173 | icase | |
174 | </p> | |
175 | </td> | |
176 | <td> | |
177 | <p> | |
178 | Yes | |
179 | </p> | |
180 | </td> | |
181 | <td> | |
182 | <p> | |
183 | Specifies that matching of regular expressions against a character | |
184 | container sequence shall be performed without regard to case. | |
185 | </p> | |
186 | </td> | |
187 | </tr> | |
188 | <tr> | |
189 | <td> | |
190 | <p> | |
191 | nosubs | |
192 | </p> | |
193 | </td> | |
194 | <td> | |
195 | <p> | |
196 | Yes | |
197 | </p> | |
198 | </td> | |
199 | <td> | |
200 | <p> | |
201 | Specifies that when a regular expression is matched against a | |
202 | character container sequence, then no sub-expression matches | |
203 | are to be stored in the supplied <a class="link" href="../match_results.html" title="match_results"><code class="computeroutput"><span class="identifier">match_results</span></code></a> structure. | |
204 | </p> | |
205 | </td> | |
206 | </tr> | |
207 | <tr> | |
208 | <td> | |
209 | <p> | |
210 | optimize | |
211 | </p> | |
212 | </td> | |
213 | <td> | |
214 | <p> | |
215 | Yes | |
216 | </p> | |
217 | </td> | |
218 | <td> | |
219 | <p> | |
220 | Specifies that the regular expression engine should pay more | |
221 | attention to the speed with which regular expressions are matched, | |
222 | and less to the speed with which regular expression objects are | |
223 | constructed. Otherwise it has no detectable effect on the program | |
224 | output. This currently has no effect for Boost.Regex. | |
225 | </p> | |
226 | </td> | |
227 | </tr> | |
228 | <tr> | |
229 | <td> | |
230 | <p> | |
231 | collate | |
232 | </p> | |
233 | </td> | |
234 | <td> | |
235 | <p> | |
236 | Yes | |
237 | </p> | |
238 | </td> | |
239 | <td> | |
240 | <p> | |
241 | Specifies that character ranges of the form <code class="computeroutput"><span class="special">[</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">b</span><span class="special">]</span></code> | |
242 | should be locale sensitive. This bit is on by default for <a class="link" href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-Basic regular | |
243 | expressions</a>, but can be unset to force ranges to be compared | |
244 | by code point only. | |
245 | </p> | |
246 | </td> | |
247 | </tr> | |
248 | <tr> | |
249 | <td> | |
250 | <p> | |
251 | newline_alt | |
252 | </p> | |
253 | </td> | |
254 | <td> | |
255 | <p> | |
256 | No | |
257 | </p> | |
258 | </td> | |
259 | <td> | |
260 | <p> | |
261 | Specifies that the \n character has the same effect as the alternation | |
262 | operator |. Allows newline separated lists to be used as a list | |
263 | of alternatives. This bit is already set, if you use the <code class="computeroutput"><span class="identifier">grep</span></code> option. | |
264 | </p> | |
265 | </td> | |
266 | </tr> | |
267 | <tr> | |
268 | <td> | |
269 | <p> | |
270 | no_char_classes | |
271 | </p> | |
272 | </td> | |
273 | <td> | |
274 | <p> | |
275 | No | |
276 | </p> | |
277 | </td> | |
278 | <td> | |
279 | <p> | |
280 | When set then character classes such as <code class="computeroutput"><span class="special">[[:</span><span class="identifier">alnum</span><span class="special">:]]</span></code> | |
281 | are not allowed. | |
282 | </p> | |
283 | </td> | |
284 | </tr> | |
285 | <tr> | |
286 | <td> | |
287 | <p> | |
288 | no_escape_in_lists | |
289 | </p> | |
290 | </td> | |
291 | <td> | |
292 | <p> | |
293 | No | |
294 | </p> | |
295 | </td> | |
296 | <td> | |
297 | <p> | |
298 | When set this makes the escape character ordinary inside lists, | |
299 | so that <code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code> would match either '\' or 'b'. | |
300 | This bit is on by default for <a class="link" href="../../syntax/basic_syntax.html" title="POSIX Basic Regular Expression Syntax">POSIX-basic | |
301 | regular expressions</a>, but can be unset to force escapes | |
302 | to be recognised inside lists. | |
303 | </p> | |
304 | </td> | |
305 | </tr> | |
306 | <tr> | |
307 | <td> | |
308 | <p> | |
309 | no_intervals | |
310 | </p> | |
311 | </td> | |
312 | <td> | |
313 | <p> | |
314 | No | |
315 | </p> | |
316 | </td> | |
317 | <td> | |
318 | <p> | |
319 | When set then bounded repeats such as a{2,3} are not permitted. | |
320 | </p> | |
321 | </td> | |
322 | </tr> | |
323 | <tr> | |
324 | <td> | |
325 | <p> | |
326 | bk_plus_qm | |
327 | </p> | |
328 | </td> | |
329 | <td> | |
330 | <p> | |
331 | No | |
332 | </p> | |
333 | </td> | |
334 | <td> | |
335 | <p> | |
336 | When set then <code class="computeroutput"><span class="special">\?</span></code> | |
337 | acts as a zero-or-one repeat operator, and <code class="computeroutput"><span class="special">\+</span></code> | |
338 | acts as a one-or-more repeat operator. | |
339 | </p> | |
340 | </td> | |
341 | </tr> | |
342 | <tr> | |
343 | <td> | |
344 | <p> | |
345 | bk_vbar | |
346 | </p> | |
347 | </td> | |
348 | <td> | |
349 | <p> | |
350 | No | |
351 | </p> | |
352 | </td> | |
353 | <td> | |
354 | <p> | |
355 | When set then <code class="computeroutput"><span class="special">\|</span></code> | |
356 | acts as the alternation operator. | |
357 | </p> | |
358 | </td> | |
359 | </tr> | |
360 | <tr> | |
361 | <td> | |
362 | <p> | |
363 | no_except | |
364 | </p> | |
365 | </td> | |
366 | <td> | |
367 | <p> | |
368 | No | |
369 | </p> | |
370 | </td> | |
371 | <td> | |
372 | <p> | |
373 | Prevents <a class="link" href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing | |
374 | an exception when an invalid expression is encountered. | |
375 | </p> | |
376 | </td> | |
377 | </tr> | |
378 | <tr> | |
379 | <td> | |
380 | <p> | |
381 | save_subexpression_location | |
382 | </p> | |
383 | </td> | |
384 | <td> | |
385 | <p> | |
386 | No | |
387 | </p> | |
388 | </td> | |
389 | <td> | |
390 | <p> | |
391 | When set then the locations of individual sub-expressions within | |
392 | the <span class="emphasis"><em>original regular expression string</em></span> can | |
393 | be accessed via the <a class="link" href="../basic_regex.html#boost_regex.basic_regex.subexpression"><code class="computeroutput"><span class="identifier">subexpression</span><span class="special">()</span></code></a> | |
394 | member function of <code class="computeroutput"><span class="identifier">basic_regex</span></code>. | |
395 | </p> | |
396 | </td> | |
397 | </tr> | |
398 | </tbody> | |
399 | </table></div> | |
400 | </div> | |
401 | <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> | |
402 | <td align="left"></td> | |
403 | <td align="right"><div class="copyright-footer">Copyright © 1998-2013 John Maddock<p> | |
404 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
405 | 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>) | |
406 | </p> | |
407 | </div></td> | |
408 | </tr></table> | |
409 | <hr> | |
410 | <div class="spirit-nav"> | |
411 | <a accesskey="p" href="syntax_option_type_extended.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../syntax_option_type.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="syntax_option_type_literal.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> | |
412 | </div> | |
413 | </body> | |
414 | </html> |