[#boost-urls-grammar-range_rule-0f]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::range&lowbar;rule
:relfileprefix: ../../../
:mrdocs:

Match a repeating number of elements

== Synopses

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/range_rule.hpp#L397[boost&sol;url&sol;grammar&sol;range&lowbar;rule&period;hpp]&gt;`

Match a repeating number of elements


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:boost/urls/grammar/Rule.adoc[Rule] R&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
xref:boost/urls/grammar/range_rule-00.adoc[range&lowbar;rule](
    R const& next,
    std::size&lowbar;t N = 0,
    std::size&lowbar;t M = std&colon;&colon;size&lowbar;t(&hyphen;1)) noexcept;
----

[.small]#xref:boost/urls/grammar/range_rule-00.adoc[_» more&period;&period;&period;_]#

Match a repeating number of elements


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    xref:boost/urls/grammar/Rule.adoc[Rule] R1,
    xref:boost/urls/grammar/Rule.adoc[Rule] R2&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
xref:boost/urls/grammar/range_rule-06.adoc[range&lowbar;rule](
    R1 const& first,
    R2 const& next,
    std::size&lowbar;t N = 0,
    std::size&lowbar;t M = std&colon;&colon;size&lowbar;t(&hyphen;1)) noexcept
requires ! std&colon;&colon;is&lowbar;integral&lt;R2&gt;&colon;&colon;value;
----

[.small]#xref:boost/urls/grammar/range_rule-06.adoc[_» more&period;&period;&period;_]#

== Return Value

A rule that matches the range&period;

== Parameters

[cols=2]
|===
| Name
| Description
| *next*
| The rule to use for matching each element&period; The range extends until this rule returns an error&period;
| *N*
| The minimum number of elements for the range to be valid&period; If omitted, this defaults to zero&period;
| *M*
| The maximum number of elements for the range to be valid&period; If omitted, this defaults to unlimited&period;
| *first*
| The rule to use for matching the first element&period; If this rule returns an error, the range is empty&period;
|===

== See Also

xref:boost/urls/grammar/alpha_chars.adoc[`alpha&lowbar;chars`], xref:boost/urls/grammar/delim_rule-011.adoc[`delim&lowbar;rule`], xref:boost/urls/grammar/error.adoc[`error&colon;&colon;end&lowbar;of&lowbar;range`], xref:boost/urls/grammar/parse-0d.adoc[`parse`], xref:boost/urls/grammar/range.adoc[`range`], xref:boost/urls/grammar/tuple_rule.adoc[`tuple&lowbar;rule`], xref:boost/urls/grammar/squelch.adoc[`squelch`]&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
