require'misc'
 t=.'terrence brannon'
  t
terrence brannon
  chop t
┌────────┬───────┐
│terrence│brannon│
└────────┴───────┘

  'r'chop t
┌──┬──────┬─────┐
│te│ence b│annon│
└──┴──────┴─────┘
  'n'chop t
┌─────┬──────┬─┐
│terre│ce bra│o│
└─────┴──────┴─┘


2007/3/28, Terrence Brannon <[EMAIL PROTECTED]>:

On 3/28/07, Roger Hui <[EMAIL PROTECTED]> wrote:
> For ordinary splitting, you should start with ;.
yes, definition here - http://www.jsoftware.com/help/dictionary/d331.htm

This definition uses a bevy of terms that are lost on me but I hope
they become clear with time.

> rather than ;: .  For example:
>
>    <;._1 ' dazlious eleemosynary deipnosophist  aba'
> +--------+------------+-------------++---+
> |dazlious|eleemosynary|deipnosophist||aba|
> +--------+------------+-------------++---+

my original question was about choosing the split delimiter... how
would you split
"terrence234brannon" by the regular expression \d+ for instance?

not only that, but I get a truncation when I try this unless the
string starts with a space.
   t
terrence brannon
   <;._1 t
┌───────────────┐
│errence brannon│
└───────────────┘

and the split delimiter should be settable to a series of contiguous
whitespace, not just a single whitespace character.

Finally most people would trim the leading and trailing whitespace
from the string before splitting it...

>
> You will not find an actual definition of "unit
> axis" in the dictionary.  The authors depend on
> your good sense to figure out what it is.
> (Unit means 1.)
>
> I think you mean to look at the dictionary page
> for ;: but you quoted the page for ,: .
>
>
>
> ----- Original Message -----
> From: Terrence Brannon <[EMAIL PROTECTED]>
> Date: Wednesday, March 28, 2007 8:39 am
> Subject: [Jgeneral] ;: -- is the word separator parameterizable?
>
> > Most agile languages offer a split() function which can split a string
> > on any delimiter, with a series of whitespace as the default.
> >
> > Is it possible to specify what the verb ;: will use to split the
> > string?
> > Finally, the dictionary description of ;: is very unlike what I
> > expected:
> > <definition url="http://www.jsoftware.com/help/dictionary/d322.htm";>
> > ,:y adds a leading unit axis to y , giving a result of shape 1,$y .
> > </definition>
> >
> > -- the above definition does not define unit axis, nor does it
> > make a
> > hyperlink to those terms, so it confuses me.
> >
> > The Lab: A Taste of J (1) says that it chops a string into words, each
> > with a box.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>

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




--
Björn Helgason, Verkfræðingur
Fugl&Fiskur ehf, Þerneyjarsund 23, Box 127
801 Grímsnes ,t-póst: [EMAIL PROTECTED]
Skype: gosiminn, gsm: +3546985532
Landslags og skrúðgarðagerð, gröfuþjónusta
http://groups.google.com/group/J-Programming


Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans

góður kennari getur stigið á tær án þess að glansinn fari af skónum
         /|_      .-----------------------------------.
        ,'  .\  /  | Með léttri lund verður        |
    ,--'    _,'   | Dagurinn í dag                     |
   /       /       | Enn betri en gærdagurinn  |
  (   -.  |        `-----------------------------------'
  |     ) |        (\_ _/)
 (`-.  '--.)       (='.'=)
  `. )----'        (")_(")
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to