June Kim wrote:
> load 'strings'
> n =:;  <@(rplc&('\)';')'));.2 (0 : 0)
> ((
> abc
> defg
> \)
> lmn
> \)
> )

Of course, this requires you to put two \ in front of any ) if you
want \) in your result.  But I think this could be done somewhat
more simply.  Here's two other alternatives:
 
n=: ;<@}.;.2]0 :0
.((
.abc
.defg
.)
.1mn
.)
)
 
or
 
n=:(0 :0)rplc LF;~LF,'.' [ require'strings'
((
abc
defg
.)
1mn
.)
)
 
-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to