Sorry all - my previous findinRows_NEW fails when the last match occurs
between the final characters of x and y. Something like the following is ok
findinRows_OOPS=: (0:`((>:@(i.{.)}.[) $: }.@])@.(e.~{.))`1:@.(''-:])"1
and very fast. I hope it can be simplified to remove the "hidden agenda".
--
J.E.H.Shaw [Ewart Shaw] [email protected] TEL: +44 2476 523069
Department of Statistics, University of Warwick, Coventry CV4 7AL, UK
http://www.warwick.ac.uk/statsdept http://www.facebook.com/ewart.shaw
3 ((4&({*.(=+/))++/=3:)@([:,/0&,^:(i.3)@|:"2^:2))&.>@]^:(i.@[) <#:3 6 2
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm