That wouldn't work anyways with non-unique characters perhaps this: ('yyy' -:"1 arr) # arr yyy yyy yyy
On Thu, Aug 28, 2014 at 6:58 AM, Joe Bogner <joebog...@gmail.com> wrote: > Apologies for the extremely basic question, but I am struggling with > this after searching NuVoc and the dictionary. > > How do I locate all the indices of 'ab' in arr? > > arr=:10 $ > ;: 'ab cd yyy' > > surely this isn't the best way: > > ] (3 = +/"1 'ab' i. arr) # arr > ab > ab > ab > ab > > > I have been primarily dealing with boxed strings up to this point, > which seemed easier since it was locating an atom in a list, not a > list in a table (practicing my vocabulary here... I might be wrong > though) > > > Thanks, > Joe ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm