| Home | Libraries | People | FAQ | More

## Function template keep

boost::xpressive::keep — Create an independent sub-expression.

## Synopsis

    // In header: <boost/xpressive/regex_primitives.hpp>

    template<typename Expr> unspecified keep(Expr const & expr);

## Description

Turn off back-tracking for a sub-expression. Any branches or repeats within the sub-expression will match only one way, and no other alternatives are tried.

| Note
keep(expr) is equivalent to the perl (?>...) extension.

Parameters: |

`expr` | The sub-expression to modify.