PatternSequence

PatternSequence[p1,p2,]

is a pattern object that represents a sequence of arguments matching p1, p2, .

Details

  • PatternSequence[] represents a sequence of zero length.
  • PatternSequence can appear anywhere inside a pattern but cannot be the only element of a pattern.

Examples

open allclose all

Basic Examples  (2)

Replace a subsequence in a list:

Match a periodic pattern:

Scope  (2)

Wolfram Research (2007), PatternSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/PatternSequence.html.

Text

Wolfram Research (2007), PatternSequence, Wolfram Language function, https://reference.wolfram.com/language/ref/PatternSequence.html.

CMS

Wolfram Language. 2007. "PatternSequence." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PatternSequence.html.

APA

Wolfram Language. (2007). PatternSequence. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PatternSequence.html

BibTeX

@misc{reference.wolfram_2024_patternsequence, author="Wolfram Research", title="{PatternSequence}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/PatternSequence.html}", note=[Accessed: 26-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_patternsequence, organization={Wolfram Research}, title={PatternSequence}, year={2007}, url={https://reference.wolfram.com/language/ref/PatternSequence.html}, note=[Accessed: 26-December-2024 ]}