3 <meta http-equiv=
"Content-Type" content=
"text/html; charset=US-ASCII">
4 <title>Options for Perl 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_overview.html" title=
"Overview of syntax_option_type">
10 <link rel=
"next" href=
"syntax_option_type_extended.html" title=
"Options for POSIX Extended Regular Expressions">
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>
22 <div class=
"spirit-nav">
23 <a accesskey=
"p" href=
"syntax_option_type_overview.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_extended.html"><img src=
"../../../../../../../doc/src/images/next.png" alt=
"Next"></a>
26 <div class=
"titlepage"><div><div><h4 class=
"title">
27 <a name=
"boost_regex.ref.syntax_option_type.syntax_option_type_perl"></a><a class=
"link" href=
"syntax_option_type_perl.html" title=
"Options for Perl Regular Expressions">Options
28 for Perl Regular Expressions
</a>
29 </h4></div></div></div>
31 One of the following must always be set for perl regular expressions:
33 <div class=
"informaltable"><table class=
"table">
70 Specifies that the grammar recognized by the regular expression
71 engine uses its normal semantics: that is the same as that given
72 in the ECMA-
262, ECMAScript Language Specification, Chapter
15
73 part
10, RegExp (Regular Expression) Objects (FWD
.1).
76 This is functionally identical to the
<a class=
"link" href=
"../../syntax/perl_syntax.html" title=
"Perl Regular Expression Syntax">Perl
77 regular expression syntax
</a>.
80 Boost.Regex also recognizes all of the perl-compatible
<code class=
"computeroutput"><span class=
"special">(?...)
</span></code> extensions in this mode.
155 The following options may also be set when using perl-style regular expressions:
157 <div class=
"informaltable"><table class=
"table">
194 Specifies that matching of regular expressions against a character
195 container sequence shall be performed without regard to case.
212 Specifies that when a regular expression is matched against a
213 character container sequence, then no sub-expression matches
214 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.
231 Specifies that the regular expression engine should pay more
232 attention to the speed with which regular expressions are matched,
233 and less to the speed with which regular expression objects are
234 constructed. Otherwise it has no detectable effect on the program
235 output. This currently has no effect for Boost.Regex.
252 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>
253 should be locale sensitive.
270 Specifies that the \n character has the same effect as the alternation
271 operator |. Allows newline separated lists to be used as a list
289 Prevents
<a class=
"link" href=
"../basic_regex.html" title=
"basic_regex"><code class=
"computeroutput"><span class=
"identifier">basic_regex
</span></code></a> from throwing
290 an exception when an invalid expression is encountered.
307 Normally Boost.Regex behaves as if the Perl m-modifier is on:
308 so the assertions ^ and $ match after and before embedded newlines
309 respectively, setting this flags is equivalent to prefixing the
310 expression with (?-m).
327 Normally whether Boost.Regex will match
"." against
328 a newline character is determined by the match flag
<code class=
"computeroutput"><span class=
"identifier">match_dot_not_newline
</span></code>. Specifying
329 this flag is equivalent to prefixing the expression with
<code class=
"computeroutput"><span class=
"special">(?-
</span><span class=
"identifier">s
</span><span class=
"special">)
</span></code> and therefore causes
"."
330 not to match a newline character regardless of whether
<code class=
"computeroutput"><span class=
"identifier">match_not_dot_newline
</span></code> is set
348 Normally whether Boost.Regex will match
"." against
349 a newline character is determined by the match flag
<code class=
"computeroutput"><span class=
"identifier">match_dot_not_newline
</span></code>. Specifying
350 this flag is equivalent to prefixing the expression with
<code class=
"computeroutput"><span class=
"special">(?
</span><span class=
"identifier">s
</span><span class=
"special">)
</span></code> and therefore causes
"."
351 to match a newline character regardless of whether
<code class=
"computeroutput"><span class=
"identifier">match_not_dot_newline
</span></code> is set
369 Turns on the perl x-modifier: causes unescaped whitespace in
370 the expression to be ignored.
387 When set then empty expressions/alternatives are prohibited.
394 save_subexpression_location
404 When set then the locations of individual sub-expressions within
405 the
<span class=
"emphasis"><em>original regular expression string
</em></span> can
406 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>
407 member function of
<code class=
"computeroutput"><span class=
"identifier">basic_regex
</span></code>.
414 <table xmlns:
rev=
"http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width=
"100%"><tr>
415 <td align=
"left"></td>
416 <td align=
"right"><div class=
"copyright-footer">Copyright
© 1998-
2013 John Maddock
<p>
417 Distributed under the Boost Software License, Version
1.0. (See accompanying
418 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>)
423 <div class=
"spirit-nav">
424 <a accesskey=
"p" href=
"syntax_option_type_overview.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_extended.html"><img src=
"../../../../../../../doc/src/images/next.png" alt=
"Next"></a>