delete=: 4 : 0
's e'=. y
b=. s E. x
k=. b i. 1
(k{.x) , ; (((#e) + e&(E.i.1:)) }. ])&.> (#s) }.&.> b <;.1 x
)
x=: 100 $ 'foo upon thee ignorant ingrates '
x delete 'upon';'in'
foo grates foo grates foo grates foo
x delete 'oo';'ee'
f ignorant ingrates f ignorant ingrates f ignorant ingrates f
----- Original Message -----
From: JC Coez <[EMAIL PROTECTED]>
Date: Sunday, July 9, 2006 8:21 am
Subject: [Jprogramming] String manipulation
> I want to eliminate from a string all substrings delimited by starting and
> (different) ending delimiters. Any help is appreciated.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm