a8c0836e0e847790a1bb721a0d2cce63a6c7a4f5
[platform/upstream/boost.git] / doc / html / boost / xpressive / before.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function template before</title>
5 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="../../xpressive/reference.html#header.boost.xpressive.regex_primitives_hpp" title="Header &lt;boost/xpressive/regex_primitives.hpp&gt;">
9 <link rel="prev" href="keep.html" title="Function template keep">
10 <link rel="next" href="after.html" title="Function template after">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
15 <td align="center"><a href="../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="keep.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_primitives_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="after.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.xpressive.before"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Function template before</span></h2>
29 <p>boost::xpressive::before &#8212; Look-ahead assertion. </p>
30 </div>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../xpressive/reference.html#header.boost.xpressive.regex_primitives_hpp" title="Header &lt;boost/xpressive/regex_primitives.hpp&gt;">boost/xpressive/regex_primitives.hpp</a>&gt;
33
34 </span>
35 <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> <a class="link" href="../../Expr.html" title="Concept Expr">Expr</a><span class="special">&gt;</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <span class="identifier">before</span><span class="special">(</span><span class="identifier">Expr</span> <span class="keyword">const</span> <span class="special">&amp;</span> expr<span class="special">)</span><span class="special">;</span></pre></div>
36 <div class="refsect1">
37 <a name="id3918957"></a><h2>Description</h2>
38 <p>before(expr) succeeds if the expr sub-expression would match at the current position in the sequence, but expr is not included in the match. For instance, before("foo") succeeds if we are before a "foo". Look-ahead assertions can be negated with the bit-compliment operator.</p>
39 <div class="note"><table border="0" summary="Note">
40 <tr>
41 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../doc/src/images/note.png"></td>
42 <th align="left">Note</th>
43 </tr>
44 <tr><td align="left" valign="top"><p>before(expr) is equivalent to the perl (?=...) extension. ~before(expr) is a negative look-ahead assertion, equivalent to the perl (?!...) extension.</p></td></tr>
45 </table></div>
46 <p>
47
48 </p>
49 <div class="variablelist"><table border="0">
50 <col align="left" valign="top">
51 <tbody><tr>
52 <td><p><span class="term">Parameters:</span></p></td>
53 <td><div class="variablelist"><table border="0">
54 <col align="left" valign="top">
55 <tbody><tr>
56 <td><p><span class="term"><code class="computeroutput">expr</code></span></p></td>
57 <td><p>The sub-expression to put in the look-ahead assertion. </p></td>
58 </tr></tbody>
59 </table></div></td>
60 </tr></tbody>
61 </table></div>
62 </div>
63 </div>
64 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
65 <td align="left"></td>
66 <td align="right"><div class="copyright-footer">Copyright &#169; 2007 Eric Niebler<p>
67         Distributed under the Boost Software License, Version 1.0. (See accompanying
68         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
69       </p>
70 </div></td>
71 </tr></table>
72 <hr>
73 <div class="spirit-nav">
74 <a accesskey="p" href="keep.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../xpressive/reference.html#header.boost.xpressive.regex_primitives_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="after.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
75 </div>
76 </body>
77 </html>