Belisarius' answer works well if you are willing to work with indexes. If you prefer to work with the elements themselves, here is a rule-based solution. innrJoin[data : {{_} ..}, a_, b_] := data /. {x___, y : PatternSequence[{a}, ___, {b}], z___} :> {x, Flatten[{y}], z} innrJoin[{{1}, {2}, {3}, {4}}, 2, 3] >{{1}, {2, 3}, {4}} innrJoin[{{a}, {b}, {c}, {d}}, a, c] >{{a, b, c}, {d}} Edit -- new and improved algorithm :-)