Thanks for the tip. That got me closer (>shortNames) (E.)"0 1 1/ (>fullNames)
1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 At least I can see here now that the first short name matched rows 1-2, and the 2nd short name matched 3 and the 3rd short name matched 4 This seems to be on the right track. I'm not sure where to go from here though. It looks uglier than I'd expect too On Mon, Nov 12, 2018 at 4:21 PM Raul Miller <[email protected]> wrote: > This looks like an “outer product” issue. (Try all pairs selected from the > left and right args, then assemble the result.) > > Is that enough, or do you need a worked implementation? > > Thanks, > > — > Raul > > On Monday, November 12, 2018, Joe Bogner <[email protected]> wrote: > > > I'd like to try and find all the substring matches of two arrays > > > > > > This is a contrived example of a larger problem > > > > > > > > fullNames =: ('Joe B';'Joe Q';'Bobby Z';'Janet F') > > > > shortNames =: ('Joe';'Bob';'Jane') > > > > > fullNames > > > > Joe B > > > > Joe Q > > > > Bobby Z > > > > Janet F > > > > > shortNames > > > > Joe > > > > Bob > > > > Jane > > > > > > I'd like a result of something like: > > > > > > 0 > > > > 0 > > > > 1 > > > > 2 > > > > > > > > Indicating that Joe B matched Joe, Joe Q matched Joe, Bobby Z matched Bob > > and Janet matched Jane > > > > > > > > I struggled with E. for awhile seeing if I could get it to work > > > > > > (,: > 0{ shortNames) E. (> fullNames) > > > > > > 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > > > But I couldn't figure out how to build upon this for all shortNames > > > > Thanks, > > > > Joe > > ---------------------------------------------------------------------- > > 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
