This doesn't catch 'r2d2' . It only gets the words that are entirely made up of numbers.
Marshall -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Raul Miller Sent: Friday, March 04, 2011 3:57 PM To: Programming forum Cc: Lettow, Kenneth Subject: Re: [Jprogramming] Amending boxed array. On Fri, Mar 4, 2011 at 3:37 PM, Lettow, Kenneth <[email protected]> wrote: > I have a bunch of strings where each string is boxed and each word in > the string is also boxed. > > The problem is to replace any word that contains a number with a > generic string i.e. "NUMBER". > > For example, if the input phrases are: > > test=: (<;:'dogs and cats'),(<;:'3 blind mice'),(<<'alpha'),(<;:'6 > plus 100'),(<;:'robot model r2d2') > > The output should be: > > output=: (<;:'dogs and cats'),(<;:'NUMBER blind > mice'),(<<'alpha'),(<;:'NUMBER plus NUMBER'),(<;:'robot model NUMBER') 'NUMBER'"_^:(_ -.@-:_&".)L:0 test -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
