| Home | Libraries | People | FAQ | More

## Function repeat

boost::xpressive::repeat — Repeat a sub-expression multiple times.

## Synopsis

    template<unsigned int Min, unsigned int Max, typename Xpr>
      unspecified repeat(Xpr const & xpr);
    template<unsigned int Count, typename Xpr2>
      unspecified repeat(Xpr2 const & xpr);

## Description

There are two forms of the repeat<>() function template. To match a sub-expression N times, use repeat<N>(xpr). To match a sub-expression from M to N times, use repeat<M,N>(xpr).

The repeat<>() function creates a greedy quantifier. To make the quantifier non-greedy, apply the unary minus operator, as in -repeat<M,N>(xpr).

Parameters:

`xpr` | The sub-expression to repeat.

| Copyright © 2003, 2004 Eric Niebler