]>
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 Extended 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_perl.html" title="Options for Perl Regular Expressions"> | |
10 | <link rel="next" href="syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"> | |
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_perl.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_basic.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_extended"></a><a class="link" href="syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">Options | |
28 | for POSIX Extended Regular Expressions</a> | |
29 | </h4></div></div></div> | |
30 | <p> | |
31 | Exactly one of the following must always be set for <a class="link" href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX | |
32 | extended regular expressions</a>: | |
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 | extended | |
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 POSIX extended regular expressions | |
73 | in IEEE Std 1003.1-2001, Portable Operating System Interface | |
74 | (POSIX ), Base Definitions and Headers, Section 9, Regular Expressions | |
75 | (FWD.1). | |
76 | </p> | |
77 | <p> | |
78 | Refer to the <a class="link" href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX | |
79 | extended regular expression guide</a> for more information. | |
80 | </p> | |
81 | <p> | |
82 | In addition some perl-style escape sequences are supported (The | |
83 | POSIX standard specifies that only "special" characters | |
84 | may be escaped, all other escape sequences result in undefined | |
85 | behavior). | |
86 | </p> | |
87 | </td> | |
88 | </tr> | |
89 | <tr> | |
90 | <td> | |
91 | <p> | |
92 | egrep | |
93 | </p> | |
94 | </td> | |
95 | <td> | |
96 | <p> | |
97 | Yes | |
98 | </p> | |
99 | </td> | |
100 | <td> | |
101 | <p> | |
102 | Specifies that the grammar recognized by the regular expression | |
103 | engine is the same as that used by POSIX utility grep when given | |
104 | the -E option in IEEE Std 1003.1-2001, Portable Operating System | |
105 | Interface (POSIX ), Shells and Utilities, Section 4, Utilities, | |
106 | grep (FWD.1). | |
107 | </p> | |
108 | <p> | |
109 | That is to say, the same as <a class="link" href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX | |
110 | extended syntax</a>, but with the newline character acting | |
111 | as an alternation character in addition to "|". | |
112 | </p> | |
113 | </td> | |
114 | </tr> | |
115 | <tr> | |
116 | <td> | |
117 | <p> | |
118 | awk | |
119 | </p> | |
120 | </td> | |
121 | <td> | |
122 | <p> | |
123 | Yes | |
124 | </p> | |
125 | </td> | |
126 | <td> | |
127 | <p> | |
128 | Specifies that the grammar recognized by the regular expression | |
129 | engine is the same as that used by POSIX utility awk in IEEE | |
130 | Std 1003.1-2001, Portable Operating System Interface (POSIX ), | |
131 | Shells and Utilities, Section 4, awk (FWD.1). | |
132 | </p> | |
133 | <p> | |
134 | That is to say: the same as <a class="link" href="../../syntax/basic_extended.html" title="POSIX Extended Regular Expression Syntax">POSIX | |
135 | extended syntax</a>, but with escape sequences in character | |
136 | classes permitted. | |
137 | </p> | |
138 | <p> | |
139 | In addition some perl-style escape sequences are supported (actually | |
140 | the awk syntax only requires \a \b \t \v \f \n and \r to be recognised, | |
141 | all other Perl-style escape sequences invoke undefined behavior | |
142 | according to the POSIX standard, but are in fact recognised by | |
143 | Boost.Regex). | |
144 | </p> | |
145 | </td> | |
146 | </tr> | |
147 | </tbody> | |
148 | </table></div> | |
149 | <p> | |
150 | The following options may also be set when using POSIX extended regular | |
151 | expressions: | |
152 | </p> | |
153 | <div class="informaltable"><table class="table"> | |
154 | <colgroup> | |
155 | <col> | |
156 | <col> | |
157 | <col> | |
158 | </colgroup> | |
159 | <thead><tr> | |
160 | <th> | |
161 | <p> | |
162 | Element | |
163 | </p> | |
164 | </th> | |
165 | <th> | |
166 | <p> | |
167 | Standardized | |
168 | </p> | |
169 | </th> | |
170 | <th> | |
171 | <p> | |
172 | Effect when set | |
173 | </p> | |
174 | </th> | |
175 | </tr></thead> | |
176 | <tbody> | |
177 | <tr> | |
178 | <td> | |
179 | <p> | |
180 | icase | |
181 | </p> | |
182 | </td> | |
183 | <td> | |
184 | <p> | |
185 | Yes | |
186 | </p> | |
187 | </td> | |
188 | <td> | |
189 | <p> | |
190 | Specifies that matching of regular expressions against a character | |
191 | container sequence shall be performed without regard to case. | |
192 | </p> | |
193 | </td> | |
194 | </tr> | |
195 | <tr> | |
196 | <td> | |
197 | <p> | |
198 | nosubs | |
199 | </p> | |
200 | </td> | |
201 | <td> | |
202 | <p> | |
203 | Yes | |
204 | </p> | |
205 | </td> | |
206 | <td> | |
207 | <p> | |
208 | Specifies that when a regular expression is matched against a | |
209 | character container sequence, then no sub-expression matches | |
210 | 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. | |
211 | </p> | |
212 | </td> | |
213 | </tr> | |
214 | <tr> | |
215 | <td> | |
216 | <p> | |
217 | optimize | |
218 | </p> | |
219 | </td> | |
220 | <td> | |
221 | <p> | |
222 | Yes | |
223 | </p> | |
224 | </td> | |
225 | <td> | |
226 | <p> | |
227 | Specifies that the regular expression engine should pay more | |
228 | attention to the speed with which regular expressions are matched, | |
229 | and less to the speed with which regular expression objects are | |
230 | constructed. Otherwise it has no detectable effect on the program | |
231 | output. This currently has no effect for Boost.Regex. | |
232 | </p> | |
233 | </td> | |
234 | </tr> | |
235 | <tr> | |
236 | <td> | |
237 | <p> | |
238 | collate | |
239 | </p> | |
240 | </td> | |
241 | <td> | |
242 | <p> | |
243 | Yes | |
244 | </p> | |
245 | </td> | |
246 | <td> | |
247 | <p> | |
248 | 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> | |
249 | should be locale sensitive. This bit is on by default for POSIX-Extended | |
250 | regular expressions, but can be unset to force ranges to be compared | |
251 | by code point only. | |
252 | </p> | |
253 | </td> | |
254 | </tr> | |
255 | <tr> | |
256 | <td> | |
257 | <p> | |
258 | newline_alt | |
259 | </p> | |
260 | </td> | |
261 | <td> | |
262 | <p> | |
263 | No | |
264 | </p> | |
265 | </td> | |
266 | <td> | |
267 | <p> | |
268 | Specifies that the \n character has the same effect as the alternation | |
269 | operator |. Allows newline separated lists to be used as a list | |
270 | of alternatives. | |
271 | </p> | |
272 | </td> | |
273 | </tr> | |
274 | <tr> | |
275 | <td> | |
276 | <p> | |
277 | no_escape_in_lists | |
278 | </p> | |
279 | </td> | |
280 | <td> | |
281 | <p> | |
282 | No | |
283 | </p> | |
284 | </td> | |
285 | <td> | |
286 | <p> | |
287 | When set this makes the escape character ordinary inside lists, | |
288 | so that <code class="computeroutput"><span class="special">[\</span><span class="identifier">b</span><span class="special">]</span></code> would match either '\' or 'b'. | |
289 | This bit is on by default for POSIX-Extended regular expressions, | |
290 | but can be unset to force escapes to be recognised inside lists. | |
291 | </p> | |
292 | </td> | |
293 | </tr> | |
294 | <tr> | |
295 | <td> | |
296 | <p> | |
297 | no_bk_refs | |
298 | </p> | |
299 | </td> | |
300 | <td> | |
301 | <p> | |
302 | No | |
303 | </p> | |
304 | </td> | |
305 | <td> | |
306 | <p> | |
307 | When set then backreferences are disabled. This bit is on by | |
308 | default for POSIX-Extended regular expressions, but can be unset | |
309 | to support for backreferences on. | |
310 | </p> | |
311 | </td> | |
312 | </tr> | |
313 | <tr> | |
314 | <td> | |
315 | <p> | |
316 | no_except | |
317 | </p> | |
318 | </td> | |
319 | <td> | |
320 | <p> | |
321 | No | |
322 | </p> | |
323 | </td> | |
324 | <td> | |
325 | <p> | |
326 | Prevents <a class="link" href="../basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a> from throwing | |
327 | an exception when an invalid expression is encountered. | |
328 | </p> | |
329 | </td> | |
330 | </tr> | |
331 | <tr> | |
332 | <td> | |
333 | <p> | |
334 | save_subexpression_location | |
335 | </p> | |
336 | </td> | |
337 | <td> | |
338 | <p> | |
339 | No | |
340 | </p> | |
341 | </td> | |
342 | <td> | |
343 | <p> | |
344 | When set then the locations of individual sub-expressions within | |
345 | the <span class="emphasis"><em>original regular expression string</em></span> can | |
346 | 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> | |
347 | member function of <code class="computeroutput"><span class="identifier">basic_regex</span></code>. | |
348 | </p> | |
349 | </td> | |
350 | </tr> | |
351 | </tbody> | |
352 | </table></div> | |
353 | </div> | |
354 | <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> | |
355 | <td align="left"></td> | |
356 | <td align="right"><div class="copyright-footer">Copyright © 1998-2013 John Maddock<p> | |
357 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
358 | 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>) | |
359 | </p> | |
360 | </div></td> | |
361 | </tr></table> | |
362 | <hr> | |
363 | <div class="spirit-nav"> | |
364 | <a accesskey="p" href="syntax_option_type_perl.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_basic.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> | |
365 | </div> | |
366 | </body> | |
367 | </html> |