Within a text processing task I iteratively have to remove special parts.
My solution at the moment is below, but I failed to remove the explicit loop in no_shared_btbs
NB. lines from text matrix y starting with string x are excluded
start_other_lines =: 4 : 0
(+./"1 x ~:"1($x){."1 y)#y
)
NB. Remove lines starting with shared btb such as 'archiv', 'xmlout' and the like.
no_shared_btbs =: 3 : 0
f =.'archiv';'xmlout';'sqlpar'
e =. y
for_z. f do. e =. (>z) start_other_lines e end.
)
Thanks for hints, Markus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm