⍷ — Groups / Find
Function. Keys: Alt-Minus e. Hanzi: 寻/群 (尋/群). Ranks: ∞ monadic, ∞ ∞ dyadic
⍷Y gives the positions of each distinct major cell of Y, matched and ordered as by ∪. On a keyed axis, the positions are keys. In Dyalog, this is {⊂ω}⌸Y.
⍷"abca" ⍝ (0 3◇1◇2)ₓX⍷Y marks starting positions where the whole pattern X occurs in Y. The result has Y’s shape. Overlapping occurrences are marked.
"ana"⍷"banana" ⍝ $f $t $f $t $f $f
1 1⍷1 1 1 ⍝ $t $t $fWorks with multidimensional patterns, and compares items with tolerance.