[Jprogramming] String manipulation

greg heil gheil.j at gmail.com
Mon Jul 10 03:21:10 HKT 2006


JC Coez <jc.coez at wanadoo.fr> wrote:
> I want to eliminate from a string all substrings delimited by starting and (different) ending delimiters. Any help is appreciated.

Depending on what your exact needs are you may need more than

On 7/9/06, R&S HUI <rhui000 at shaw.ca> wrote:
> delete=: 4 : 0
 's e'=. y
 b=. s E. x
 k=. b i. 1
 bx=. b <;.1 x
 c=. e&(+./@E.)&> bx
 (k{.x) , ; bx (I.c)}~ ((#e)&+@(e&(E.i.1:)) }. ])&.> c#bx
)


Eg
   'asd(fg(hj)kl)' delete '(';')'
asd(fgkl)

~greg


More information about the Programming mailing list