> On Sun, Aug 17, 2008 at 10:39 AM, Roger Hui  wrote:

> > s=: 'ab',LF,'abc de',LF,'ab de',LF,'de ef',LF
> > w=: <;._1@(' '&,)&.> <;._2 s
> > u=: ~. ; w
> > u ,. <@I."1 |: (w

> From: Raul Miller <[EMAIL PROTECTED]>
> 
> I would have been tempted to use
> w=: <@;:;._2 s
> u=: ~. ; w
> u,.u [EMAIL PROTECTED]:1 w
> 
> (or maybe even a variable-free rephrasing of that?)

Here's a variable-free shot with slightly different twist

   (; ([EMAIL PROTECTED] ,. </.) #&> # [EMAIL PROTECTED]) <@;:;._2 s
+---+-----+
|ab |0 2  |
+---+-----+
|abc|1    |
+---+-----+
|de |1 2 3|
+---+-----+
|ef |3    |
+---+-----+


      
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to