Hi - I just wrote a string removal verb:
NB.* removeStr: remove string x from string y removeStr=: 4 : 0 wh=. I. whb=. x E. y rmb=. -. (1) (~.;(<i.#x)+&.>wh)}whb rmb#y NB.EG 'H n brn c?' -: 'ow' removeStr 'How now brown cow?' NB.EG 'abcdef' -: 'AA' removeStr 'abcAAAdefAAA' NB. May be non-intuitive ) Note the second example in the comment on the final line - since 'AA' occurs twice in 'AAA', both are removed, thus removing the triplet. It seems an unlikely case but is this behavior too confusing? Does anyone have an alternate version of this? Thanks, Devon -- Devon McCormick, CFA Quantitative Consultant ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
