_2 ;\;: a only works if we are guaranteed that the things delimited by - are valid J words or tokens.
Still, it is cute. Thanks, -- Raul On Thu, Mar 23, 2017 at 6:12 AM, Arie Groeneveld <[email protected]> wrote: > _2 ;\;: a > > Op 23-03-17 om 10:47 schreef Gian Medri: > >> Hi! >> >> I have a=:'an-as-tig-mat-ic' or b=:'tim-ing' >> >> and a function: >> >> fra=: 3 : 0 >> p=.(]<;._1 ) '-',y NB. cut >> o=.<:$p >> p=.>p,each '-' >> ((' ' ([: I. '-' = ])} ]) o{p) o}p NB. replacing >> ) >> fra a >> an- >> as- >> tig- >> mat- >> ic >> fra b >> tim- >> ing >> >> >> I would like to know if there is a simpler way to get the same result. >> >> Thanks >> >> Gian Medri >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
