Rebuild a lot of documentation.

[SVN r43650]
This commit is contained in:
Daniel James
2008-03-16 11:38:32 +00:00
parent b39edff796
commit 9546df1f23
82 changed files with 1664 additions and 1362 deletions

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>POSIX Extended Regular Expression Syntax</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="perl_syntax.html" title="Perl Regular Expression Syntax">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,12 +24,12 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.basic_extended"></a><a href="basic_extended.html" title="POSIX Extended Regular Expression Syntax"> POSIX Extended Regular
<a name="boost_regex.syntax.basic_extended"></a><a class="link" href="basic_extended.html" title="POSIX Extended Regular Expression Syntax"> POSIX Extended Regular
Expression Syntax</a>
</h3></div></div></div>
<a name="boost_regex.syntax.basic_extended.synopsis"></a><h4>
<a name="id504344"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a>
<a name="id2647939"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.synopsis">Synopsis</a>
</h4>
<p>
The POSIX-Extended regular expression syntax is supported by the POSIX C
@ -38,7 +38,8 @@
the flag <code class="computeroutput"><span class="identifier">extended</span></code> to the
regex constructor, for example:
</p>
<pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Extended expression:
<pre class="programlisting">
<span class="comment">// e1 is a case sensitive POSIX-Extended expression:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">extended</span><span class="special">);</span>
<span class="comment">// e2 a case insensitive POSIX-Extended expression:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">extended</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
@ -46,8 +47,8 @@
<a name="boost_regex.posix_extended_syntax"></a><p>
</p>
<a name="boost_regex.syntax.basic_extended.posix_extended_syntax"></a><h4>
<a name="id504609"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX
<a name="id2648180"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.posix_extended_syntax">POSIX
Extended Syntax</a>
</h4>
<p>
@ -56,8 +57,8 @@
</p>
<pre class="programlisting">.[{()\*+?|^$</pre>
<a name="boost_regex.syntax.basic_extended.wildcard_"></a><h5>
<a name="id504649"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a>
<a name="id2648215"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.wildcard_">Wildcard:</a>
</h5>
<p>
The single character '.' when used outside of a character set will match
@ -74,8 +75,8 @@
</li>
</ul></div>
<a name="boost_regex.syntax.basic_extended.anchors_"></a><h5>
<a name="id504717"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a>
<a name="id2648276"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.anchors_">Anchors:</a>
</h5>
<p>
A '^' character shall match the start of a line when used as the first character
@ -86,8 +87,8 @@
of an expression, or the last character of a sub-expression.
</p>
<a name="boost_regex.syntax.basic_extended.marked_sub_expressions_"></a><h5>
<a name="id504752"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked
<a name="id2648309"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.marked_sub_expressions_">Marked
sub-expressions:</a>
</h5>
<p>
@ -98,8 +99,8 @@
to by a back-reference.
</p>
<a name="boost_regex.syntax.basic_extended.repeats_"></a><h5>
<a name="id504809"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a>
<a name="id2648360"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.repeats_">Repeats:</a>
</h5>
<p>
Any atom (a single character, a marked sub-expression, or a character class)
@ -164,28 +165,31 @@ cab
<p>
Will match either of:
</p>
<pre class="programlisting"><span class="identifier">aa</span>
<pre class="programlisting">
<span class="identifier">aa</span>
<span class="identifier">aaa</span>
</pre>
<p>
But neither of:
</p>
<pre class="programlisting"><span class="identifier">a</span>
<pre class="programlisting">
<span class="identifier">a</span>
<span class="identifier">aaaa</span>
</pre>
<p>
It is an error to use a repeat operator, if the preceding construct can not
be repeated, for example:
</p>
<pre class="programlisting"><span class="identifier">a</span><span class="special">(*)</span>
<pre class="programlisting">
<span class="identifier">a</span><span class="special">(*)</span>
</pre>
<p>
Will raise an error, as there is nothing for the <code class="computeroutput"><span class="special">*</span></code>
operator to be applied to.
</p>
<a name="boost_regex.syntax.basic_extended.back_references_"></a><h5>
<a name="id505256"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a>
<a name="id2648772"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.back_references_">Back references:</a>
</h5>
<p>
An escape character followed by a digit <span class="emphasis"><em>n</em></span>, where <span class="emphasis"><em>n</em></span>
@ -196,12 +200,14 @@ cab
<p>
Will match the string:
</p>
<pre class="programlisting"><span class="identifier">aaabbaaa</span>
<pre class="programlisting">
<span class="identifier">aaabbaaa</span>
</pre>
<p>
But not the string:
</p>
<pre class="programlisting"><span class="identifier">aaabba</span>
<pre class="programlisting">
<span class="identifier">aaabba</span>
</pre>
<div class="caution"><table border="0" summary="Caution">
<tr>
@ -214,8 +220,8 @@ cab
</p></td></tr>
</table></div>
<a name="boost_regex.syntax.basic_extended.alternation"></a><h5>
<a name="id505351"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a>
<a name="id2648861"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.alternation">Alternation</a>
</h5>
<p>
The <code class="computeroutput"><span class="special">|</span></code> operator will match either
@ -227,8 +233,8 @@ cab
will match either of "abd" or "abef".
</p>
<a name="boost_regex.syntax.basic_extended.character_sets_"></a><h5>
<a name="id505454"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character
<a name="id2648955"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_sets_">Character
sets:</a>
</h5>
<p>
@ -240,8 +246,8 @@ cab
A bracket expression may contain any combination of the following:
</p>
<a name="boost_regex.syntax.basic_extended.single_characters_"></a><h6>
<a name="id505490"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single
<a name="id2648987"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.single_characters_">Single
characters:</a>
</h6>
<p>
@ -249,8 +255,8 @@ cab
or 'c'.
</p>
<a name="boost_regex.syntax.basic_extended.character_ranges_"></a><h6>
<a name="id505541"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character
<a name="id2649034"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_ranges_">Character
ranges:</a>
</h6>
<p>
@ -260,13 +266,13 @@ cab
within the range <span class="emphasis"><em>y</em></span> to <span class="emphasis"><em>z</em></span>, if it
collates within that range; this results in locale specific behavior . This
behavior can be turned off by unsetting the <code class="computeroutput"><span class="identifier">collate</span></code>
<a href="../ref/syntax_option_type.html" title="syntax_option_type">option flag</a> - in
<a class="link" href="../ref/syntax_option_type.html" title="syntax_option_type">option flag</a> - in
which case whether a character appears within a range is determined by comparing
the code points of the characters only.
</p>
<a name="boost_regex.syntax.basic_extended.negation_"></a><h6>
<a name="id505642"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a>
<a name="id2649123"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.negation_">Negation:</a>
</h6>
<p>
If the bracket-expression begins with the ^ character, then it matches the
@ -274,18 +280,18 @@ cab
range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>.
</p>
<a name="boost_regex.syntax.basic_extended.character_classes_"></a><h6>
<a name="id505724"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character
<a name="id2649198"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_classes_">Character
classes:</a>
</h6>
<p>
An expression of the form <code class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></code>
matches the named character class "name", for example <code class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></code> matches any lower case character. See
<a href="character_classes.html" title="Character Class Names">character class names</a>.
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p>
<a name="boost_regex.syntax.basic_extended.collating_elements_"></a><h6>
<a name="id505806"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating
<a name="id2649273"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.collating_elements_">Collating
Elements:</a>
</h6>
<p>
@ -304,23 +310,24 @@ cab
match either one of the characters 'abc^'.
</p>
<p>
As an extension, a collating element may also be specified via its <a href="collating_names.html" title="Collating Names">symbolic name</a>, for example:
As an extension, a collating element may also be specified via its <a class="link" href="collating_names.html" title="Collating Names">symbolic name</a>, for example:
</p>
<pre class="programlisting"><span class="special">[[.</span><span class="identifier">NUL</span><span class="special">.]]</span>
<pre class="programlisting">
<span class="special">[[.</span><span class="identifier">NUL</span><span class="special">.]]</span>
</pre>
<p>
matches a NUL character.
</p>
<a name="boost_regex.syntax.basic_extended.equivalence_classes_"></a><h6>
<a name="id505968"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence
<a name="id2649421"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.equivalence_classes_">Equivalence
classes:</a>
</h6>
<p>
An expression of the form <code class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></code>,
matches any character or collating element whose primary sort key is the
same as that for collating element <span class="emphasis"><em>col</em></span>, as with colating
elements the name <span class="emphasis"><em>col</em></span> may be a <a href="collating_names.html" title="Collating Names">symbolic
elements the name <span class="emphasis"><em>col</em></span> may be a <a class="link" href="collating_names.html" title="Collating Names">symbolic
name</a>. A primary sort key is one that ignores case, accentation, or
locale-specific tailorings; so for example <code class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></code> matches
any of the characters: a, <20>, <20>, <20>, <20>, <20>, <20>, A, <20>, <20>, <20>, <20>, <20> and <20>. Unfortunately implementation
@ -329,16 +336,16 @@ cab
or even all locales on one platform.
</p>
<a name="boost_regex.syntax.basic_extended.combinations_"></a><h6>
<a name="id506072"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a>
<a name="id2649518"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.combinations_">Combinations:</a>
</h6>
<p>
All of the above can be combined in one character set declaration, for example:
<code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]]</span></code>.
</p>
<a name="boost_regex.syntax.basic_extended.escapes"></a><h5>
<a name="id506152"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a>
<a name="id2649589"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes">Escapes</a>
</h5>
<p>
The POSIX standard defines no escape sequences for POSIX-Extended regular
@ -363,8 +370,8 @@ cab
extensions are also supported by Boost.Regex:
</p>
<a name="boost_regex.syntax.basic_extended.escapes_matching_a_specific_character"></a><h6>
<a name="id506222"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes
<a name="id2649652"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.escapes_matching_a_specific_character">Escapes
matching a specific character</a>
</h6>
<p>
@ -552,8 +559,8 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_"></a><h6>
<a name="id506569"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single
<a name="id2649964"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended._quot_single_character_quot__character_classes_">"Single
character" character classes:</a>
</h6>
<p>
@ -706,8 +713,8 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.character_properties"></a><h6>
<a name="id507201"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character
<a name="id2650537"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.character_properties">Character
Properties</a>
</h6>
<p>
@ -813,8 +820,8 @@ cab
matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>.
</p>
<a name="boost_regex.syntax.basic_extended.word_boundaries"></a><h6>
<a name="id507602"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a>
<a name="id2650903"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.word_boundaries">Word Boundaries</a>
</h6>
<p>
The following escape sequences match the boundaries of words:
@ -888,8 +895,8 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.buffer_boundaries"></a><h6>
<a name="id507795"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer
<a name="id2651077"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.buffer_boundaries">Buffer
boundaries</a>
</h6>
<p>
@ -979,8 +986,8 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.continuation_escape"></a><h6>
<a name="id508030"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation
<a name="id2651291"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.continuation_escape">Continuation
Escape</a>
</h6>
<p>
@ -991,8 +998,8 @@ cab
match to start where the last one ended.
</p>
<a name="boost_regex.syntax.basic_extended.quoting_escape"></a><h6>
<a name="id508079"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting
<a name="id2651337"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.quoting_escape">Quoting
escape</a>
</h6>
<p>
@ -1001,12 +1008,13 @@ cab
as literals, until either the end of the regular expression or <code class="computeroutput"><span class="special">\</span><span class="identifier">E</span></code> is found.
For example the expression: <code class="computeroutput"><span class="special">\</span><span class="identifier">Q</span><span class="special">\*+\</span><span class="identifier">Ea</span><span class="special">+</span></code> would match either of:
</p>
<pre class="programlisting"><span class="special">\*+</span><span class="identifier">a</span>
<pre class="programlisting">
<span class="special">\*+</span><span class="identifier">a</span>
<span class="special">\*+</span><span class="identifier">aaa</span>
</pre>
<a name="boost_regex.syntax.basic_extended.unicode_escapes"></a><h6>
<a name="id508203"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode
<a name="id2651450"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.unicode_escapes">Unicode
escapes</a>
</h6>
<div class="informaltable"><table class="table">
@ -1056,8 +1064,8 @@ cab
</tbody>
</table></div>
<a name="boost_regex.syntax.basic_extended.any_other_escape"></a><h6>
<a name="id508336"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other
<a name="id2651570"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.any_other_escape">Any other
escape</a>
</h6>
<p>
@ -1065,8 +1073,8 @@ cab
\@ matches a literal '@'.
</p>
<a name="boost_regex.syntax.basic_extended.operator_precedence"></a><h5>
<a name="id508366"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator
<a name="id2651597"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.operator_precedence">Operator
precedence</a>
</h5>
<p>
@ -1101,31 +1109,32 @@ cab
</li>
</ol></div>
<a name="boost_regex.syntax.basic_extended.what_gets_matched"></a><h5>
<a name="id508555"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What
<a name="id2651770"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.what_gets_matched">What
Gets Matched</a>
</h5>
<p>
When there is more that one way to match a regular expression, the "best"
possible match is obtained using the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
possible match is obtained using the <a class="link" href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
rule</a>.
</p>
<a name="boost_regex.syntax.basic_extended.variations"></a><h4>
<a name="id508595"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a>
<a name="id2651805"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.variations">Variations</a>
</h4>
<a name="boost_regex.syntax.basic_extended.egrep"></a><h5>
<a name="id508618"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a>
<a name="id2651826"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.egrep">Egrep</a>
</h5>
<p>
When an expression is compiled with the <a href="../ref/syntax_option_type.html" title="syntax_option_type">flag
When an expression is compiled with the <a class="link" href="../ref/syntax_option_type.html" title="syntax_option_type">flag
<code class="computeroutput"><span class="identifier">egrep</span></code></a> set, then the
expression is treated as a newline separated list of <a href="basic_extended.html#boost_regex.posix_extended_syntax">POSIX-Extended
expression is treated as a newline separated list of <a class="link" href="basic_extended.html#boost_regex.posix_extended_syntax">POSIX-Extended
expressions</a>, a match is found if any of the expressions in the list
match, for example:
</p>
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">egrep</span><span class="special">);</span>
<pre class="programlisting">
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">egrep</span><span class="special">);</span>
</pre>
<p>
will match either of the POSIX-Basic expressions "abc" or "def".
@ -1136,11 +1145,11 @@ cab
used with the -E option.
</p>
<a name="boost_regex.syntax.basic_extended.awk"></a><h5>
<a name="id508776"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a>
<a name="id2651971"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.awk">awk</a>
</h5>
<p>
In addition to the <a href="basic_extended.html#boost_regex.posix_extended_syntax">POSIX-Extended
In addition to the <a class="link" href="basic_extended.html#boost_regex.posix_extended_syntax">POSIX-Extended
features</a> the escape character is special inside a character class
declaration.
</p>
@ -1150,21 +1159,21 @@ cab
these by default anyway.
</p>
<a name="boost_regex.syntax.basic_extended.options"></a><h4>
<a name="id508822"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a>
<a name="id2652012"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.options">Options</a>
</h4>
<p>
There are a <a href="../ref/syntax_option_type/syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">variety
There are a <a class="link" href="../ref/syntax_option_type/syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions">variety
of flags</a> that may be combined with the <code class="computeroutput"><span class="identifier">extended</span></code>
and <code class="computeroutput"><span class="identifier">egrep</span></code> options when constructing
the regular expression, in particular note that the <a href="../ref/syntax_option_type/syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions"><code class="computeroutput"><span class="identifier">newline_alt</span></code></a> option alters the syntax,
while the <a href="../ref/syntax_option_type/syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code>, <code class="computeroutput"><span class="identifier">nosubs</span></code>
the regular expression, in particular note that the <a class="link" href="../ref/syntax_option_type/syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions"><code class="computeroutput"><span class="identifier">newline_alt</span></code></a> option alters the syntax,
while the <a class="link" href="../ref/syntax_option_type/syntax_option_type_extended.html" title="Options for POSIX Extended Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code>, <code class="computeroutput"><span class="identifier">nosubs</span></code>
and <code class="computeroutput"><span class="identifier">icase</span></code> options</a>
modify how the case and locale sensitivity are to be applied.
</p>
<a name="boost_regex.syntax.basic_extended.references"></a><h4>
<a name="id508952"></a>
<a href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
<a name="id2652132"></a>
<a class="link" href="basic_extended.html#boost_regex.syntax.basic_extended.references">References</a>
</h4>
<p>
<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html" target="_top">IEEE

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>POSIX Basic Regular Expression Syntax</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="basic_extended.html" title="POSIX Extended Regular Expression Syntax">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,20 +24,21 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.basic_syntax"></a><a href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax"> POSIX Basic Regular
<a name="boost_regex.syntax.basic_syntax"></a><a class="link" href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax"> POSIX Basic Regular
Expression Syntax</a>
</h3></div></div></div>
<a name="boost_regex.syntax.basic_syntax.synopsis"></a><h4>
<a name="id509034"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
<a name="id2652204"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.synopsis">Synopsis</a>
</h4>
<p>
The POSIX-Basic regular expression syntax is used by the Unix utility <code class="computeroutput"><span class="identifier">sed</span></code>, and variations are used by <code class="computeroutput"><span class="identifier">grep</span></code> and <code class="computeroutput"><span class="identifier">emacs</span></code>.
You can construct POSIX basic regular expressions in Boost.Regex by passing
the flag <code class="computeroutput"><span class="identifier">basic</span></code> to the regex
constructor (see <a href="../ref/syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>), for example:
constructor (see <a class="link" href="../ref/syntax_option_type.html" title="syntax_option_type"><code class="computeroutput"><span class="identifier">syntax_option_type</span></code></a>), for example:
</p>
<pre class="programlisting"><span class="comment">// e1 is a case sensitive POSIX-Basic expression:
<pre class="programlisting">
<span class="comment">// e1 is a case sensitive POSIX-Basic expression:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">);</span>
<span class="comment">// e2 a case insensitive POSIX-Basic expression:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">basic</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
@ -45,8 +46,8 @@
<a name="boost_regex.posix_basic"></a><p>
</p>
<a name="boost_regex.syntax.basic_syntax.posix_basic_syntax"></a><h4>
<a name="id509325"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
<a name="id2652471"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.posix_basic_syntax">POSIX
Basic Syntax</a>
</h4>
<p>
@ -55,8 +56,8 @@
</p>
<pre class="programlisting">.[\*^$</pre>
<a name="boost_regex.syntax.basic_syntax.wildcard_"></a><h5>
<a name="id509364"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
<a name="id2652505"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.wildcard_">Wildcard:</a>
</h5>
<p>
The single character '.' when used outside of a character set will match
@ -73,8 +74,8 @@
</li>
</ul></div>
<a name="boost_regex.syntax.basic_syntax.anchors_"></a><h5>
<a name="id509433"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
<a name="id2652567"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.anchors_">Anchors:</a>
</h5>
<p>
A '^' character shall match the start of a line when used as the first character
@ -85,8 +86,8 @@
of an expression, or the last character of a sub-expression.
</p>
<a name="boost_regex.syntax.basic_syntax.marked_sub_expressions_"></a><h5>
<a name="id509469"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
<a name="id2652601"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.marked_sub_expressions_">Marked
sub-expressions:</a>
</h5>
<p>
@ -97,8 +98,8 @@
by a back-reference.
</p>
<a name="boost_regex.syntax.basic_syntax.repeats_"></a><h5>
<a name="id509526"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
<a name="id2652652"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.repeats_">Repeats:</a>
</h5>
<p>
Any atom (a single character, a marked sub-expression, or a character class)
@ -155,8 +156,8 @@ aaaa
to.
</p>
<a name="boost_regex.syntax.basic_syntax.back_references_"></a><h5>
<a name="id509770"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
<a name="id2652877"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.back_references_">Back references:</a>
</h5>
<p>
An escape character followed by a digit <span class="emphasis"><em>n</em></span>, where <span class="emphasis"><em>n</em></span>
@ -173,8 +174,8 @@ aaaa
</p>
<pre class="programlisting">aaabba</pre>
<a name="boost_regex.syntax.basic_syntax.character_sets_"></a><h5>
<a name="id509844"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
<a name="id2652945"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_sets_">Character
sets:</a>
</h5>
<p>
@ -186,8 +187,8 @@ aaaa
A bracket expression may contain any combination of the following:
</p>
<a name="boost_regex.syntax.basic_syntax.single_characters_"></a><h6>
<a name="id509880"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
<a name="id2652978"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.single_characters_">Single
characters:</a>
</h6>
<p>
@ -195,8 +196,8 @@ aaaa
or 'c'.
</p>
<a name="boost_regex.syntax.basic_syntax.character_ranges_"></a><h6>
<a name="id509930"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
<a name="id2653023"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_ranges_">Character
ranges:</a>
</h6>
<p>
@ -211,8 +212,8 @@ aaaa
of the characters only.
</p>
<a name="boost_regex.syntax.basic_syntax.negation_"></a><h6>
<a name="id510022"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
<a name="id2653104"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.negation_">Negation:</a>
</h6>
<p>
If the bracket-expression begins with the ^ character, then it matches the
@ -220,18 +221,18 @@ aaaa
range a-c.
</p>
<a name="boost_regex.syntax.basic_syntax.character_classes_"></a><h6>
<a name="id510083"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
<a name="id2653161"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.character_classes_">Character
classes:</a>
</h6>
<p>
An expression of the form <code class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></code>
matches the named character class "name", for example <code class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></code> matches any lower case character. See
<a href="character_classes.html" title="Character Class Names">character class names</a>.
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.collating_elements_"></a><h6>
<a name="id510166"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
<a name="id2653236"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.collating_elements_">Collating
Elements:</a>
</h6>
<p>
@ -255,19 +256,19 @@ aaaa
</p>
<pre class="programlisting">[[.NUL.]]</pre>
<p>
matches a 'NUL' character. See <a href="collating_names.html" title="Collating Names">collating
matches a 'NUL' character. See <a class="link" href="collating_names.html" title="Collating Names">collating
element names</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.equivalence_classes_"></a><h6>
<a name="id510315"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
<a name="id2653370"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.equivalence_classes_">Equivalence
classes:</a>
</h6>
<p>
An expression of theform <code class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></code>,
matches any character or collating element whose primary sort key is the
same as that for collating element <span class="emphasis"><em>col</em></span>, as with collating
elements the name <span class="emphasis"><em>col</em></span> may be a <a href="collating_names.html" title="Collating Names">collating
elements the name <span class="emphasis"><em>col</em></span> may be a <a class="link" href="collating_names.html" title="Collating Names">collating
symbolic name</a>. A primary sort key is one that ignores case, accentation,
or locale-specific tailorings; so for example <code class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></code> matches
any of the characters: a, <20>, <20>, <20>, <20>, <20>, <20>, A, <20>, <20>, <20>, <20>, <20> and <20>. Unfortunately implementation
@ -276,16 +277,16 @@ aaaa
or even all locales on one platform.
</p>
<a name="boost_regex.syntax.basic_syntax.combinations_"></a><h6>
<a name="id510419"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
<a name="id2653467"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.combinations_">Combinations:</a>
</h6>
<p>
All of the above can be combined in one character set declaration, for example:
<code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]].</span></code>
</p>
<a name="boost_regex.syntax.basic_syntax.escapes"></a><h5>
<a name="id510497"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
<a name="id2653538"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.escapes">Escapes</a>
</h5>
<p>
With the exception of the escape sequences \{, \}, \(, and \), which are
@ -299,45 +300,46 @@ aaaa
will match either a literal '\' or a '^'.
</p>
<a name="boost_regex.syntax.basic_syntax.what_gets_matched"></a><h4>
<a name="id510554"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
<a name="id2653590"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.what_gets_matched">What Gets
Matched</a>
</h4>
<p>
When there is more that one way to match a regular expression, the "best"
possible match is obtained using the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
possible match is obtained using the <a class="link" href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost-longest
rule</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.variations"></a><h4>
<a name="id510594"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
<a name="id2653624"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.variations">Variations</a>
</h4>
<a name="boost_regex.grep_syntax"></a><p>
</p>
<a name="boost_regex.syntax.basic_syntax.grep"></a><h5>
<a name="id510626"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
<a name="id2653655"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.grep">Grep</a>
</h5>
<p>
When an expression is compiled with the flag <code class="computeroutput"><span class="identifier">grep</span></code>
set, then the expression is treated as a newline separated list of <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic expressions</a>, a match
set, then the expression is treated as a newline separated list of <a class="link" href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic expressions</a>, a match
is found if any of the expressions in the list match, for example:
</p>
<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">grep</span><span class="special">);</span>
<pre class="programlisting">
<span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e</span><span class="special">(</span><span class="string">"abc\ndef"</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">grep</span><span class="special">);</span>
</pre>
<p>
will match either of the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic
will match either of the <a class="link" href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic
expressions</a> "abc" or "def".
</p>
<p>
As its name suggests, this behavior is consistent with the Unix utility grep.
</p>
<a name="boost_regex.syntax.basic_syntax.emacs"></a><h5>
<a name="id510770"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
<a name="id2653787"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.emacs">emacs</a>
</h5>
<p>
In addition to the <a href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic features</a>
In addition to the <a class="link" href="basic_syntax.html#boost_regex.posix_basic">POSIX-Basic features</a>
the following characters are also special:
</p>
<div class="informaltable"><table class="table">
@ -606,29 +608,29 @@ aaaa
</table></div>
<p>
Finally, you should note that emacs style regular expressions are matched
according to the <a href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">Perl
according to the <a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">Perl
"depth first search" rules</a>. Emacs expressions are matched
this way because they contain Perl-like extensions, that do not interact
well with the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">POSIX-style
well with the <a class="link" href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">POSIX-style
leftmost-longest rule</a>.
</p>
<a name="boost_regex.syntax.basic_syntax.options"></a><h4>
<a name="id511266"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
<a name="id2654230"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.options">Options</a>
</h4>
<p>
There are a <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">variety
There are a <a class="link" href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions">variety
of flags</a> that may be combined with the <code class="computeroutput"><span class="identifier">basic</span></code>
and <code class="computeroutput"><span class="identifier">grep</span></code> options when constructing
the regular expression, in particular note that the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">newline_alt</span></code>, <code class="computeroutput"><span class="identifier">no_char_classes</span></code>,
the regular expression, in particular note that the <a class="link" href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">newline_alt</span></code>, <code class="computeroutput"><span class="identifier">no_char_classes</span></code>,
<code class="computeroutput"><span class="identifier">no</span><span class="special">-</span><span class="identifier">intervals</span></code>, <code class="computeroutput"><span class="identifier">bk_plus_qm</span></code>
and <code class="computeroutput"><span class="identifier">bk_plus_vbar</span></code></a> options
all alter the syntax, while the <a href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code> and <code class="computeroutput"><span class="identifier">icase</span></code>
all alter the syntax, while the <a class="link" href="../ref/syntax_option_type/syntax_option_type_basic.html" title="Options for POSIX Basic Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code> and <code class="computeroutput"><span class="identifier">icase</span></code>
options</a> modify how the case and locale sensitivity are to be applied.
</p>
<a name="boost_regex.syntax.basic_syntax.references"></a><h4>
<a name="id511438"></a>
<a href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
<a name="id2654387"></a>
<a class="link" href="basic_syntax.html#boost_regex.syntax.basic_syntax.references">References</a>
</h4>
<p>
<a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html" target="_top">IEEE

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Character Class Names</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="basic_syntax.html" title="POSIX Basic Regular Expression Syntax">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.character_classes"></a><a href="character_classes.html" title="Character Class Names"> Character Class
<a name="boost_regex.syntax.character_classes"></a><a class="link" href="character_classes.html" title="Character Class Names"> Character Class
Names</a>
</h3></div></div></div>
<div class="toc"><dl>

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Character classes that are supported by Unicode Regular Expressions</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../character_classes.html" title="Character Class Names">
<link rel="prev" href="std_char_clases.html" title="Character Classes that are Always Supported">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.character_classes.optional_char_class_names"></a><a href="optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
<a name="boost_regex.syntax.character_classes.optional_char_class_names"></a><a class="link" href="optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
Character classes that are supported by Unicode Regular Expressions</a>
</h4></div></div></div>
<p>

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Character Classes that are Always Supported</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../character_classes.html" title="Character Class Names">
<link rel="prev" href="../character_classes.html" title="Character Class Names">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.character_classes.std_char_clases"></a><a href="std_char_clases.html" title="Character Classes that are Always Supported">
<a name="boost_regex.syntax.character_classes.std_char_clases"></a><a class="link" href="std_char_clases.html" title="Character Classes that are Always Supported">
Character Classes that are Always Supported</a>
</h4></div></div></div>
<p>

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Collating Names</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="character_classes/optional_char_class_names.html" title="Character classes that are supported by Unicode Regular Expressions">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.collating_names"></a><a href="collating_names.html" title="Collating Names"> Collating Names</a>
<a name="boost_regex.syntax.collating_names"></a><a class="link" href="collating_names.html" title="Collating Names"> Collating Names</a>
</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="collating_names/digraphs.html"> Digraphs</a></span></dt>

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Digraphs</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../collating_names.html" title="Collating Names">
<link rel="prev" href="../collating_names.html" title="Collating Names">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.collating_names.digraphs"></a><a href="digraphs.html" title="Digraphs"> Digraphs</a>
<a name="boost_regex.syntax.collating_names.digraphs"></a><a class="link" href="digraphs.html" title="Digraphs"> Digraphs</a>
</h4></div></div></div>
<p>
The following are treated as valid digraphs when used as a collating name:

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Named Unicode Characters</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../collating_names.html" title="Collating Names">
<link rel="prev" href="posix_symbolic_names.html" title="POSIX Symbolic Names">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,11 +24,11 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.collating_names.named_unicode"></a><a href="named_unicode.html" title="Named Unicode Characters">
<a name="boost_regex.syntax.collating_names.named_unicode"></a><a class="link" href="named_unicode.html" title="Named Unicode Characters">
Named Unicode Characters</a>
</h4></div></div></div>
<p>
When using <a href="../../unicode.html" title="Unicode and Boost.Regex">Unicode aware regular expressions</a>
When using <a class="link" href="../../unicode.html" title="Unicode and Boost.Regex">Unicode aware regular expressions</a>
(with the <code class="computeroutput"><span class="identifier">u32regex</span></code> type),
all the normal symbolic names for Unicode characters (those given in Unidata.txt)
are recognised. So for example:

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>POSIX Symbolic Names</title>
<link rel="stylesheet" href="../../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../../index.html" title="Boost.Regex">
<link rel="up" href="../collating_names.html" title="Collating Names">
<link rel="prev" href="digraphs.html" title="Digraphs">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_regex.syntax.collating_names.posix_symbolic_names"></a><a href="posix_symbolic_names.html" title="POSIX Symbolic Names">
<a name="boost_regex.syntax.collating_names.posix_symbolic_names"></a><a class="link" href="posix_symbolic_names.html" title="POSIX Symbolic Names">
POSIX Symbolic Names</a>
</h4></div></div></div>
<p>

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>The Leftmost Longest Rule</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="collating_names/named_unicode.html" title="Named Unicode Characters">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,7 +24,7 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.leftmost_longest_rule"></a><a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule"> The Leftmost
<a name="boost_regex.syntax.leftmost_longest_rule"></a><a class="link" href="leftmost_longest_rule.html" title="The Leftmost Longest Rule"> The Leftmost
Longest Rule</a>
</h3></div></div></div>
<p>

View File

@ -3,7 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Perl Regular Expression Syntax</title>
<link rel="stylesheet" href="../../../../../../doc/html/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot_2006-12-17_0120">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="../../index.html" title="Boost.Regex">
<link rel="up" href="../syntax.html" title="Regular Expression Syntax">
<link rel="prev" href="../syntax.html" title="Regular Expression Syntax">
@ -12,7 +12,7 @@
<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.htm">Home</a></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/people/people.htm">People</a></td>
<td align="center"><a href="http://www.boost.org/more/faq.htm">FAQ</a></td>
@ -24,29 +24,30 @@
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_regex.syntax.perl_syntax"></a><a href="perl_syntax.html" title="Perl Regular Expression Syntax"> Perl Regular Expression
<a name="boost_regex.syntax.perl_syntax"></a><a class="link" href="perl_syntax.html" title="Perl Regular Expression Syntax"> Perl Regular Expression
Syntax</a>
</h3></div></div></div>
<a name="boost_regex.syntax.perl_syntax.synopsis"></a><h4>
<a name="id497765"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a>
<a name="id2642330"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.synopsis">Synopsis</a>
</h4>
<p>
The Perl regular expression syntax is based on that used by the programming
language Perl . Perl regular expressions are the default behavior in Boost.Regex
or you can pass the flag <code class="computeroutput"><span class="identifier">perl</span></code>
to the <a href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
to the <a class="link" href="../ref/basic_regex.html" title="basic_regex"><code class="computeroutput"><span class="identifier">basic_regex</span></code></a>
constructor, for example:
</p>
<pre class="programlisting"><span class="comment">// e1 is a case sensitive Perl regular expression:
<pre class="programlisting">
<span class="comment">// e1 is a case sensitive Perl regular expression:
</span><span class="comment">// since Perl is the default option there's no need to explicitly specify the syntax used here:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e1</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">);</span>
<span class="comment">// e2 a case insensitive Perl regular expression:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span> <span class="identifier">e2</span><span class="special">(</span><span class="identifier">my_expression</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">perl</span><span class="special">|</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">regex</span><span class="special">::</span><span class="identifier">icase</span><span class="special">);</span>
</pre>
<a name="boost_regex.syntax.perl_syntax.perl_regular_expression_syntax"></a><h4>
<a name="id497986"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl
<a name="id2642512"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_regular_expression_syntax">Perl
Regular Expression Syntax</a>
</h4>
<p>
@ -55,8 +56,8 @@
</p>
<pre class="programlisting">.[{()\*+?|^$</pre>
<a name="boost_regex.syntax.perl_syntax.wildcard"></a><h5>
<a name="id498024"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a>
<a name="id2642543"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.wildcard">Wildcard</a>
</h5>
<p>
The single character '.' when used outside of a character set will match
@ -64,19 +65,19 @@
</p>
<div class="itemizedlist"><ul type="disc">
<li>
The NULL character when the <a href="../ref/match_flag_type.html" title="match_flag_type">flag
The NULL character when the <a class="link" href="../ref/match_flag_type.html" title="match_flag_type">flag
<code class="computeroutput"><span class="identifier">match_no_dot_null</span></code></a>
is passed to the matching algorithms.
</li>
<li>
The newline character when the <a href="../ref/match_flag_type.html" title="match_flag_type">flag
The newline character when the <a class="link" href="../ref/match_flag_type.html" title="match_flag_type">flag
<code class="computeroutput"><span class="identifier">match_not_dot_newline</span></code></a>
is passed to the matching algorithms.
</li>
</ul></div>
<a name="boost_regex.syntax.perl_syntax.anchors"></a><h5>
<a name="id498105"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a>
<a name="id2642608"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.anchors">Anchors</a>
</h5>
<p>
A '^' character shall match the start of a line.
@ -85,8 +86,8 @@
A '$' character shall match the end of a line.
</p>
<a name="boost_regex.syntax.perl_syntax.marked_sub_expressions"></a><h5>
<a name="id498139"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked
<a name="id2642634"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.marked_sub_expressions">Marked
sub-expressions</a>
</h5>
<p>
@ -97,8 +98,8 @@
to by a back-reference.
</p>
<a name="boost_regex.syntax.perl_syntax.non_marking_grouping"></a><h5>
<a name="id498194"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking
<a name="id2642680"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_grouping">Non-marking
grouping</a>
</h5>
<p>
@ -111,8 +112,8 @@
out any separate sub-expressions.
</p>
<a name="boost_regex.syntax.perl_syntax.repeats"></a><h5>
<a name="id498283"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a>
<a name="id2642751"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.repeats">Repeats</a>
</h5>
<p>
Any atom (a single character, a marked sub-expression, or a character class)
@ -125,7 +126,8 @@
preceding atom zero or more times, for example the expression <code class="computeroutput"><span class="identifier">a</span><span class="special">*</span><span class="identifier">b</span></code>
will match any of the following:
</p>
<pre class="programlisting"><span class="identifier">b</span>
<pre class="programlisting">
<span class="identifier">b</span>
<span class="identifier">ab</span>
<span class="identifier">aaaaaaaab</span>
</pre>
@ -134,26 +136,30 @@
preceding atom one or more times, for example the expression <code class="computeroutput"><span class="identifier">a</span><span class="special">+</span><span class="identifier">b</span></code>
will match any of the following:
</p>
<pre class="programlisting"><span class="identifier">ab</span>
<pre class="programlisting">
<span class="identifier">ab</span>
<span class="identifier">aaaaaaaab</span>
</pre>
<p>
But will not match:
</p>
<pre class="programlisting"><span class="identifier">b</span>
<pre class="programlisting">
<span class="identifier">b</span>
</pre>
<p>
The <code class="computeroutput"><span class="special">?</span></code> operator will match the
preceding atom zero or one times, for example the expression ca?b will match
any of the following:
</p>
<pre class="programlisting"><span class="identifier">cb</span>
<pre class="programlisting">
<span class="identifier">cb</span>
<span class="identifier">cab</span>
</pre>
<p>
But will not match:
</p>
<pre class="programlisting"><span class="identifier">caab</span>
<pre class="programlisting">
<span class="identifier">caab</span>
</pre>
<p>
An atom can also be repeated with a bounded repeat:
@ -177,28 +183,31 @@
<p>
Will match either of:
</p>
<pre class="programlisting"><span class="identifier">aa</span>
<pre class="programlisting">
<span class="identifier">aa</span>
<span class="identifier">aaa</span>
</pre>
<p>
But neither of:
</p>
<pre class="programlisting"><span class="identifier">a</span>
<pre class="programlisting">
<span class="identifier">a</span>
<span class="identifier">aaaa</span>
</pre>
<p>
It is an error to use a repeat operator, if the preceding construct can not
be repeated, for example:
</p>
<pre class="programlisting"><span class="identifier">a</span><span class="special">(*)</span>
<pre class="programlisting">
<span class="identifier">a</span><span class="special">(*)</span>
</pre>
<p>
Will raise an error, as there is nothing for the <code class="computeroutput"><span class="special">*</span></code>
operator to be applied to.
</p>
<a name="boost_regex.syntax.perl_syntax.non_greedy_repeats"></a><h5>
<a name="id498756"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy
<a name="id2643149"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_greedy_repeats">Non greedy
repeats</a>
</h5>
<p>
@ -228,8 +237,8 @@
input as possible.
</p>
<a name="boost_regex.syntax.perl_syntax.back_references"></a><h5>
<a name="id498897"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a>
<a name="id2643270"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.back_references">Back references</a>
</h5>
<p>
An escape character followed by a digit <span class="emphasis"><em>n</em></span>, where <span class="emphasis"><em>n</em></span>
@ -240,16 +249,18 @@
<p>
Will match the string:
</p>
<pre class="programlisting"><span class="identifier">aaabbaaa</span>
<pre class="programlisting">
<span class="identifier">aaabbaaa</span>
</pre>
<p>
But not the string:
</p>
<pre class="programlisting"><span class="identifier">aaabba</span>
<pre class="programlisting">
<span class="identifier">aaabba</span>
</pre>
<a name="boost_regex.syntax.perl_syntax.alternation"></a><h5>
<a name="id498980"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a>
<a name="id2643340"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.alternation">Alternation</a>
</h5>
<p>
The <code class="computeroutput"><span class="special">|</span></code> operator will match either
@ -277,8 +288,8 @@
<code class="computeroutput"><span class="special">(?:</span><span class="identifier">abc</span><span class="special">)??</span></code> has exactly the same effect.
</p>
<a name="boost_regex.syntax.perl_syntax.character_sets"></a><h5>
<a name="id499168"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a>
<a name="id2643496"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_sets">Character sets</a>
</h5>
<p>
A character set is a bracket-expression starting with <code class="computeroutput"><span class="special">[</span></code>
@ -290,16 +301,16 @@
A bracket expression may contain any combination of the following:
</p>
<a name="boost_regex.syntax.perl_syntax.single_characters"></a><h6>
<a name="id499227"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a>
<a name="id2643544"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.single_characters">Single characters</a>
</h6>
<p>
For example <code class="computeroutput"><span class="special">[</span><span class="identifier">abc</span><span class="special">]</span></code>, will match any of the characters 'a', 'b',
or 'c'.
</p>
<a name="boost_regex.syntax.perl_syntax.character_ranges"></a><h6>
<a name="id499277"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character
<a name="id2643584"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_ranges">Character
ranges</a>
</h6>
<p>
@ -307,12 +318,12 @@
will match any single character in the range 'a' to 'c'. By default, for
Perl regular expressions, a character x is within the range y to z, if the
code point of the character lies within the codepoints of the endpoints of
the range. Alternatively, if you set the <a href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code> flag</a> when constructing the
the range. Alternatively, if you set the <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions"><code class="computeroutput"><span class="identifier">collate</span></code> flag</a> when constructing the
regular expression, then ranges are locale sensitive.
</p>
<a name="boost_regex.syntax.perl_syntax.negation"></a><h6>
<a name="id499358"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a>
<a name="id2643651"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.negation">Negation</a>
</h6>
<p>
If the bracket-expression begins with the ^ character, then it matches the
@ -320,18 +331,18 @@
range <code class="computeroutput"><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span></code>.
</p>
<a name="boost_regex.syntax.perl_syntax.character_classes"></a><h6>
<a name="id499440"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character
<a name="id2643720"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_classes">Character
classes</a>
</h6>
<p>
An expression of the form <code class="computeroutput"><span class="special">[[:</span><span class="identifier">name</span><span class="special">:]]</span></code>
matches the named character class "name", for example <code class="computeroutput"><span class="special">[[:</span><span class="identifier">lower</span><span class="special">:]]</span></code> matches any lower case character. See
<a href="character_classes.html" title="Character Class Names">character class names</a>.
<a class="link" href="character_classes.html" title="Character Class Names">character class names</a>.
</p>
<a name="boost_regex.syntax.perl_syntax.collating_elements"></a><h6>
<a name="id499523"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating
<a name="id2643785"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.collating_elements">Collating
Elements</a>
</h6>
<p>
@ -345,24 +356,25 @@
a single collating element in the current locale.
</p>
<p>
As an extension, a collating element may also be specified via it's <a href="collating_names.html" title="Collating Names">symbolic name</a>, for example:
As an extension, a collating element may also be specified via it's <a class="link" href="collating_names.html" title="Collating Names">symbolic name</a>, for example:
</p>
<pre class="programlisting"><span class="special">[[.</span><span class="identifier">NUL</span><span class="special">.]]</span>
<pre class="programlisting">
<span class="special">[[.</span><span class="identifier">NUL</span><span class="special">.]]</span>
</pre>
<p>
matches a <code class="computeroutput"><span class="special">\</span><span class="number">0</span></code>
character.
</p>
<a name="boost_regex.syntax.perl_syntax.equivalence_classes"></a><h6>
<a name="id499675"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence
<a name="id2643908"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.equivalence_classes">Equivalence
classes</a>
</h6>
<p>
An expression of the form <code class="computeroutput"><span class="special">[[=</span><span class="identifier">col</span><span class="special">=]]</span></code>,
matches any character or collating element whose primary sort key is the
same as that for collating element <span class="emphasis"><em>col</em></span>, as with collating
elements the name <span class="emphasis"><em>col</em></span> may be a <a href="collating_names.html" title="Collating Names">symbolic
elements the name <span class="emphasis"><em>col</em></span> may be a <a class="link" href="collating_names.html" title="Collating Names">symbolic
name</a>. A primary sort key is one that ignores case, accentation, or
locale-specific tailorings; so for example <code class="computeroutput"><span class="special">[[=</span><span class="identifier">a</span><span class="special">=]]</span></code> matches
any of the characters: a, <20>, <20>, <20>, <20>, <20>, <20>, A, <20>, <20>, <20>, <20>, <20> and <20>. Unfortunately implementation
@ -371,8 +383,8 @@
or even all locales on one platform.
</p>
<a name="boost_regex.syntax.perl_syntax.escaped_characters"></a><h6>
<a name="id499778"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped
<a name="id2643994"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escaped_characters">Escaped
Characters</a>
</h6>
<p>
@ -383,16 +395,16 @@
is <span class="emphasis"><em>not</em></span> a "word" character.
</p>
<a name="boost_regex.syntax.perl_syntax.combinations"></a><h6>
<a name="id499884"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a>
<a name="id2644077"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.combinations">Combinations</a>
</h6>
<p>
All of the above can be combined in one character set declaration, for example:
<code class="computeroutput"><span class="special">[[:</span><span class="identifier">digit</span><span class="special">:]</span><span class="identifier">a</span><span class="special">-</span><span class="identifier">c</span><span class="special">[.</span><span class="identifier">NUL</span><span class="special">.]]</span></code>.
</p>
<a name="boost_regex.syntax.perl_syntax.escapes"></a><h5>
<a name="id499962"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a>
<a name="id2644142"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.escapes">Escapes</a>
</h5>
<p>
Any special character preceded by an escape shall match itself.
@ -576,7 +588,7 @@
</td>
<td>
<p>
Matches the single character which has the <a href="collating_names.html" title="Collating Names">symbolic
Matches the single character which has the <a class="link" href="collating_names.html" title="Collating Names">symbolic
name</a> <span class="emphasis"><em>name</em></span>. For example <code class="computeroutput"><span class="special">\</span><span class="identifier">N</span><span class="special">{</span><span class="identifier">newline</span><span class="special">}</span></code> matches the single character \n.
</p>
</td>
@ -584,8 +596,8 @@
</tbody>
</table></div>
<a name="boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_"></a><h6>
<a name="id500675"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single
<a name="id2644746"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax._quot_single_character_quot__character_classes_">"Single
character" character classes:</a>
</h6>
<p>
@ -738,13 +750,13 @@
</tbody>
</table></div>
<a name="boost_regex.syntax.perl_syntax.character_properties"></a><h6>
<a name="id501307"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character
<a name="id2645277"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.character_properties">Character
Properties</a>
</h6>
<p>
The character property names in the following table are all equivalent to
the <a href="character_classes.html" title="Character Class Names">names used in character
the <a class="link" href="character_classes.html" title="Character Class Names">names used in character
classes</a>.
</p>
<div class="informaltable"><table class="table">
@ -846,8 +858,8 @@
matches any "digit" character, as does <code class="computeroutput"><span class="special">\</span><span class="identifier">p</span><span class="special">{</span><span class="identifier">digit</span><span class="special">}</span></code>.
</p>
<a name="boost_regex.syntax.perl_syntax.word_boundaries"></a><h6>
<a name="id501717"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a>
<a name="id2645624"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.word_boundaries">Word Boundaries</a>
</h6>
<p>
The following escape sequences match the boundaries of words:
@ -868,8 +880,8 @@
Matches only when not at a word boundary.
</p>
<a name="boost_regex.syntax.perl_syntax.buffer_boundaries"></a><h6>
<a name="id501818"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a>
<a name="id2645707"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.buffer_boundaries">Buffer boundaries</a>
</h6>
<p>
The following match only at buffer boundaries: a "buffer" in this
@ -893,8 +905,8 @@
to the regular expression <code class="computeroutput"><span class="special">\</span><span class="identifier">n</span><span class="special">*\</span><span class="identifier">z</span></code>
</p>
<a name="boost_regex.syntax.perl_syntax.continuation_escape"></a><h6>
<a name="id501902"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation
<a name="id2645777"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.continuation_escape">Continuation
Escape</a>
</h6>
<p>
@ -905,8 +917,8 @@
match to start where the last one ended.
</p>
<a name="boost_regex.syntax.perl_syntax.quoting_escape"></a><h6>
<a name="id501952"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a>
<a name="id2645817"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.quoting_escape">Quoting escape</a>
</h6>
<p>
The escape sequence <code class="computeroutput"><span class="special">\</span><span class="identifier">Q</span></code>
@ -914,12 +926,13 @@
as literals, until either the end of the regular expression or \E is found.
For example the expression: <code class="computeroutput"><span class="special">\</span><span class="identifier">Q</span><span class="special">\*+\</span><span class="identifier">Ea</span><span class="special">+</span></code> would match either of:
</p>
<pre class="programlisting"><span class="special">\*+</span><span class="identifier">a</span>
<pre class="programlisting">
<span class="special">\*+</span><span class="identifier">a</span>
<span class="special">\*+</span><span class="identifier">aaa</span>
</pre>
<a name="boost_regex.syntax.perl_syntax.unicode_escapes"></a><h6>
<a name="id502058"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a>
<a name="id2645906"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.unicode_escapes">Unicode escapes</a>
</h6>
<p>
<code class="computeroutput"><span class="special">\</span><span class="identifier">C</span></code>
@ -929,8 +942,8 @@
combining characters.
</p>
<a name="boost_regex.syntax.perl_syntax.any_other_escape"></a><h6>
<a name="id502122"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other
<a name="id2645959"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.any_other_escape">Any other
escape</a>
</h6>
<p>
@ -938,8 +951,8 @@
\@ matches a literal '@'.
</p>
<a name="boost_regex.syntax.perl_syntax.perl_extended_patterns"></a><h5>
<a name="id502151"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl
<a name="id2645982"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.perl_extended_patterns">Perl
Extended Patterns</a>
</h5>
<p>
@ -947,8 +960,8 @@
<code class="computeroutput"><span class="special">(?</span></code>.
</p>
<a name="boost_regex.syntax.perl_syntax.comments"></a><h6>
<a name="id502192"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a>
<a name="id2646014"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.comments">Comments</a>
</h6>
<p>
<code class="computeroutput"><span class="special">(?</span># <span class="special">...</span>
@ -956,8 +969,8 @@
are ignored.
</p>
<a name="boost_regex.syntax.perl_syntax.modifiers"></a><h6>
<a name="id502245"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a>
<a name="id2646056"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.modifiers">Modifiers</a>
</h6>
<p>
<code class="computeroutput"><span class="special">(?</span><span class="identifier">imsx</span><span class="special">-</span><span class="identifier">imsx</span> <span class="special">...</span> <span class="special">)</span></code> alters
@ -971,8 +984,8 @@
applies the specified modifiers to pattern only.
</p>
<a name="boost_regex.syntax.perl_syntax.non_marking_groups"></a><h6>
<a name="id502372"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking
<a name="id2646162"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.non_marking_groups">Non-marking
groups</a>
</h6>
<p>
@ -980,8 +993,8 @@
an additional sub-expression.
</p>
<a name="boost_regex.syntax.perl_syntax.lookahead"></a><h6>
<a name="id502423"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a>
<a name="id2646201"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookahead">Lookahead</a>
</h6>
<p>
<code class="computeroutput"><span class="special">(?=</span><span class="identifier">pattern</span><span class="special">)</span></code> consumes zero characters, only if pattern
@ -997,14 +1010,15 @@
letter, a punctuation symbol, and be at least 6 characters long, then the
expression:
</p>
<pre class="programlisting"><span class="special">(?=.*[[:</span><span class="identifier">lower</span><span class="special">:]])(?=.*[[:</span><span class="identifier">upper</span><span class="special">:]])(?=.*[[:</span><span class="identifier">punct</span><span class="special">:]]).{</span><span class="number">6</span><span class="special">,}</span>
<pre class="programlisting">
<span class="special">(?=.*[[:</span><span class="identifier">lower</span><span class="special">:]])(?=.*[[:</span><span class="identifier">upper</span><span class="special">:]])(?=.*[[:</span><span class="identifier">punct</span><span class="special">:]]).{</span><span class="number">6</span><span class="special">,}</span>
</pre>
<p>
could be used to validate the password.
</p>
<a name="boost_regex.syntax.perl_syntax.lookbehind"></a><h6>
<a name="id502564"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a>
<a name="id2646327"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.lookbehind">Lookbehind</a>
</h6>
<p>
<code class="computeroutput"><span class="special">(?&lt;=</span><span class="identifier">pattern</span><span class="special">)</span></code> consumes zero characters, only if pattern
@ -1017,8 +1031,8 @@
(pattern must be of fixed length).
</p>
<a name="boost_regex.syntax.perl_syntax.independent_sub_expressions"></a><h6>
<a name="id502643"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent
<a name="id2646400"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.independent_sub_expressions">Independent
sub-expressions</a>
</h6>
<p>
@ -1030,8 +1044,8 @@
no match is found at all.
</p>
<a name="boost_regex.syntax.perl_syntax.conditional_expressions"></a><h6>
<a name="id502707"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional
<a name="id2646458"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.conditional_expressions">Conditional
Expressions</a>
</h6>
<p>
@ -1050,8 +1064,8 @@
sub-expression has been matched).
</p>
<a name="boost_regex.syntax.perl_syntax.operator_precedence"></a><h5>
<a name="id502875"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator
<a name="id2646609"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.operator_precedence">Operator
precedence</a>
</h5>
<p>
@ -1086,8 +1100,8 @@
</li>
</ol></div>
<a name="boost_regex.syntax.perl_syntax.what_gets_matched"></a><h4>
<a name="id503053"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets
<a name="id2646772"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.what_gets_matched">What gets
matched</a>
</h4>
<p>
@ -1099,7 +1113,7 @@
Alternatively:
</p>
<p>
The best match found is the <a href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost
The best match found is the <a class="link" href="leftmost_longest_rule.html" title="The Leftmost Longest Rule">leftmost
match</a>, with individual elements matched as follows;
</p>
<div class="informaltable"><table class="table">
@ -1271,20 +1285,20 @@
</tbody>
</table></div>
<a name="boost_regex.syntax.perl_syntax.variations"></a><h4>
<a name="id503968"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a>
<a name="id2647599"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.variations">Variations</a>
</h4>
<p>
The <a href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">options
The <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">options
<code class="computeroutput"><span class="identifier">normal</span></code>, <code class="computeroutput"><span class="identifier">ECMAScript</span></code>,
<code class="computeroutput"><span class="identifier">JavaScript</span></code> and <code class="computeroutput"><span class="identifier">JScript</span></code></a> are all synonyms for <code class="computeroutput"><span class="identifier">perl</span></code>.
</p>
<a name="boost_regex.syntax.perl_syntax.options"></a><h4>
<a name="id504063"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a>
<a name="id2647685"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.options">Options</a>
</h4>
<p>
There are a <a href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">variety
There are a <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">variety
of flags</a> that may be combined with the <code class="computeroutput"><span class="identifier">perl</span></code>
option when constructing the regular expression, in particular note that
the <code class="computeroutput"><span class="identifier">newline_alt</span></code> option alters
@ -1293,20 +1307,20 @@
sensitivity are to be applied.
</p>
<a name="boost_regex.syntax.perl_syntax.pattern_modifiers"></a><h4>
<a name="id504164"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern
<a name="id2647777"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.pattern_modifiers">Pattern
Modifiers</a>
</h4>
<p>
The perl <code class="computeroutput"><span class="identifier">smix</span></code> modifiers can
either be applied using a <code class="computeroutput"><span class="special">(?</span><span class="identifier">smix</span><span class="special">-</span><span class="identifier">smix</span><span class="special">)</span></code> prefix to the regular expression, or with
one of the <a href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">regex-compile
one of the <a class="link" href="../ref/syntax_option_type/syntax_option_type_perl.html" title="Options for Perl Regular Expressions">regex-compile
time flags <code class="computeroutput"><span class="identifier">no_mod_m</span></code>, <code class="computeroutput"><span class="identifier">mod_x</span></code>, <code class="computeroutput"><span class="identifier">mod_s</span></code>,
and <code class="computeroutput"><span class="identifier">no_mod_s</span></code></a>.
</p>
<a name="boost_regex.syntax.perl_syntax.references"></a><h4>
<a name="id504291"></a>
<a href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a>
<a name="id2647892"></a>
<a class="link" href="perl_syntax.html#boost_regex.syntax.perl_syntax.references">References</a>
</h4>
<p>
<a href="http://perldoc.perl.org/perlre.html" target="_top">Perl 5.8</a>.