p.. or Repeated[p]

is a pattern object that represents a sequence of one or more expressions, each matching p.


represents from 1 to max expressions matching p.


represents between min and max expressions matching p.


represents exactly n expressions matching p.


  • p.. can appear as an argument of any function. It represents any sequence of arguments.
  • All the objects in the sequence represented by p.. must match p, but the objects need not be identical.
  • The expression p may, but need not, itself be a pattern object.


open allclose all

Basic Examples  (2)

Replace any list of a's by x:

Replace any list of f's with one argument:

Scope  (7)

a.. represents a sequence of a's inside any head:

Replace any list of a's with length up to 3:

Replace any list of a's with lengths between 2 and 3:

Replace lists of length exactly 3 elements:

Replace lists with lengths between 0 and 2 elements:

Replace lists with 0 to 3 identical elements:

Require only part of the pattern to be the same throughout the sequence:

Applications  (1)

Define a function that takes as an argument any list of pairs:

Properties & Relations  (4)

Repeated[p] or p.. is equivalent to Repeated[p,{1,Infinity}]:

Repeated[p,max] is equivalent to Repeated[p,{1,max}]:

Repeated[p] and Repeated[p,max] require at least one repeat:

RepeatedNull[p] and RepeatedNull[p,max] allow zero repeats:

The forms RepeatedNull[p,{min,max}] and Repeated[p,{min,max}] are equivalent:

So are the forms RepeatedNull[p,{n}] and Repeated[p,{n}]:

Possible Issues  (2)

Use parentheses or spaces to indicate that 1.. is not 1. followed by a dot:

A repeated named pattern will only match a sequence of identical repeats:

A repeated unnamed pattern can match a sequence of nonidentical elements:

Wolfram Research (1988), Repeated, Wolfram Language function, (updated 2007).


Wolfram Research (1988), Repeated, Wolfram Language function, (updated 2007).


Wolfram Language. 1988. "Repeated." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007.


Wolfram Language. (1988). Repeated. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_repeated, author="Wolfram Research", title="{Repeated}", year="2007", howpublished="\url{}", note=[Accessed: 25-July-2024 ]}


@online{reference.wolfram_2024_repeated, organization={Wolfram Research}, title={Repeated}, year={2007}, url={}, note=[Accessed: 25-July-2024 ]}