gives a list of positions at which sublist appears in list in any order.
gives all positions at which sublists matching patt in any order appear in list.
includes only the first n positions.
Details and Options
- In SubsetPosition[list,patt], patt can be an expression with head List that includes pattern constructs such as PatternSequence, Repeated (..), Blank (_) and BlankSequence (__).
- The pattern patt can also be a pattern that matches a list but does not itself have head List.
- With the default option setting OverlapsTrue, SubsetPosition includes sublists that overlap. With the setting OverlapsFalse, such sublists are excluded.
Examplesopen allclose all
Properties & Relations (1)
The order within each result of SubsetPosition is determined by the pattern:
Extract subsets corresponding to each result:
Wolfram Research (2020), SubsetPosition, Wolfram Language function, https://reference.wolfram.com/language/ref/SubsetPosition.html.
Wolfram Language. 2020. "SubsetPosition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SubsetPosition.html.
Wolfram Language. (2020). SubsetPosition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SubsetPosition.html