Post History
Ruby, 82 bytes ->w,n{[*0...w.size].permutation(n).map{e=w*1;_1.map{|x|e[x]='.'};e}.uniq.join '|'} Attempt This Online! uses permutation to do most of the work. Might be shorter with somethi...
Answer
#1: Initial revision
# [Ruby](https://www.ruby-lang.org/), 82 bytes ```ruby ->w,n{[*0...w.size].permutation(n).map{e=w*1;_1.map{|x|e[x]='.'};e}.uniq.join '|'} ```` [Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY3g3TtynXyqqO1DPT09Mr1ijOrUmP1ClKLcktLEksy8_M08jT1chMLqlNty7UMreMNwZyaiprU6IpYW3U99Vrr1Fq90rzMQr2s_Mw8BfUa9VqoyRMKSkuKFdKilfKVdBQMFWK5YPzEEjSB3Pz8PGxqjJAEkhKL0ERKUovRFSUnFqdiV2UMFIK4a8ECCA0A) uses `permutation` to do most of the work. Might be shorter with something recursive, maybe.