| Home | Libraries | People | FAQ | More

## Function template before

boost::xpressive::before — Look-ahead assertion.

## Synopsis

    template<typename Xpr> unspecified before(Xpr const & xpr);

## Description

before(xpr) succeeds if the xpr sub-expression would match at the current position in the sequence, but xpr 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.

Parameters: |
`xpr` | The sub-expression to put in the look-ahead assertion.
Notes: | before(xpr) is equivalent to the perl (?=...) extension. ~before(xpr) is a negative look-ahead assertion, equivalent to the perl (?!...) extension.

| Copyright © 2003, 2004 Eric Niebler