AnyOrder[p1,p2,…]
is a grammar rules pattern object that represents a sequence of elements matching p1, p2, … in any order.


AnyOrder
AnyOrder[p1,p2,…]
is a grammar rules pattern object that represents a sequence of elements matching p1, p2, … in any order.
Details

- AnyOrder appears inside GrammarRules and StringExpression objects.
- AnyOrder can be nested inside and outside FixedOrder, Alternatives, and other grammar rule patterns.
Examples
open all close allBasic Examples (2)
Applications (1)
Properties & Relations (1)
In a grammar, FixedOrder requires a specific order and AnyOrder supports arbitrary order:
Here the input matches the order in the FixedOrder:
The input does not match the order in the FixedOrder:
Related Guides
History
Text
Wolfram Research (2015), AnyOrder, Wolfram Language function, https://reference.wolfram.com/language/ref/AnyOrder.html.
CMS
Wolfram Language. 2015. "AnyOrder." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AnyOrder.html.
APA
Wolfram Language. (2015). AnyOrder. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AnyOrder.html
BibTeX
@misc{reference.wolfram_2025_anyorder, author="Wolfram Research", title="{AnyOrder}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/AnyOrder.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_anyorder, organization={Wolfram Research}, title={AnyOrder}, year={2015}, url={https://reference.wolfram.com/language/ref/AnyOrder.html}, note=[Accessed: 13-August-2025]}